MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / doFinal

Method doFinal

CodenameOne/src/com/codename1/security/Hmac.java:124–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 /// Finalises and returns the authentication tag. The instance is reset and
123 /// can be reused for another message with the same key.
124 public byte[] doFinal() {
125 if (!started) {
126 hash.update(innerKey, 0, innerKey.length);
127 started = true;
128 }
129 byte[] inner = hash.digest();
130 hash.update(outerKey, 0, outerKey.length);
131 hash.update(inner, 0, inner.length);
132 byte[] tag = hash.digest();
133 started = false;
134 return tag;
135 }
136
137 /// One-shot convenience.
138 public byte[] doFinal(byte[] data) {

Callers 15

runHmacVectorsMethod · 0.95
hotpMethod · 0.80
md5Method · 0.80
sha1Method · 0.80
sha224Method · 0.80
sha256Method · 0.80
sha384Method · 0.80
sha512Method · 0.80
computeHmacMethod · 0.80
invoke7Method · 0.80
verifyProbeCipherMethod · 0.80

Calls 3

updateMethod · 0.95
updateMethod · 0.65
digestMethod · 0.45

Tested by 5

runHmacVectorsMethod · 0.76
testAesMethod · 0.64
rsaEncryptMethod · 0.64
rsaDecryptMethod · 0.64