You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* DER encoded DigestInfo value to be prefixed to the hash, used for RSA signing
49
+
* See https://tools.ietf.org/html/rfc3447#page-43
50
+
*/
51
+
byte[] digestAlgorithm;
52
+
switch(operation.getDigestAlgorithm()){
53
+
caseSHA1:
54
+
digestAlgorithm = sha1PrefixToRsaSig;
55
+
break;
56
+
caseSHA224:
57
+
digestAlgorithm = sha224PrefixToRsaSig;
58
+
break;
59
+
caseSHA256:
60
+
digestAlgorithm = sha256PrefixToRsaSig;
61
+
break;
62
+
caseSHA384:
63
+
digestAlgorithm = sha384PrefixToRsaSig;
64
+
break;
65
+
caseSHA512:
66
+
digestAlgorithm = sha512PrefixToRsaSig;
67
+
break;
68
+
caseUNKNOWN:
69
+
default:
70
+
operation.completeExceptionally(newThrowable("An UNKNOWN digest algorithm was encountered during a SIGN operation against an Android KeyChain PrivateKey."));
operation.completeExceptionally(newThrowable("An UNKNOWN signature algorithm was encountered during a SIGN operation against an Android KeyChain PrivateKey."));
99
+
return;
100
+
}
101
+
} catch (Exceptionex){
102
+
operation.completeExceptionally(newThrowable("Exception caught during Android KeyChain PrivateKey operation.", ex));
0 commit comments