- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 20 for doFinal (0.05 seconds)
-
guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
mac.init(MD5_KEY); mac.update(input.getBytes(UTF_8)); assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashString(input, UTF_8).toString()); assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashBytes(input.getBytes(UTF_8)).toString());
Created: 2025-12-26 12:43 - Last Modified: 2024-12-27 16:19 - 13.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
mac.init(MD5_KEY); mac.update(input.getBytes(UTF_8)); assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashString(input, UTF_8).toString()); assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashBytes(input.getBytes(UTF_8)).toString());
Created: 2025-12-26 12:43 - Last Modified: 2024-12-27 16:19 - 13.8K bytes - Click Count (0) -
src/test/java/jcifs/util/CryptoTest.java
encryptCipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "RC4")); byte[] encrypted = encryptCipher.doFinal(plaintext); Cipher decryptCipher = Crypto.getArcfour(key); decryptCipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "RC4")); byte[] decrypted = decryptCipher.doFinal(encrypted); // Then assertNotNull(encrypted); assertNotNull(decrypted);
Created: 2025-12-20 13:44 - Last Modified: 2025-08-14 05:31 - 7.4K bytes - Click Count (0) -
src/main/java/jcifs/pac/PacMac.java
int ms_usage = mapArcfourMD5KeyUsage(keyusage); Mac mac = Mac.getInstance("HmacMD5"); MessageDigest md = MessageDigest.getInstance("MD5"); mac.init(key); byte[] dk = mac.doFinal(MD5_CONSTANT); try { // little endian md.update((byte) (ms_usage & 0xFF)); md.update((byte) (ms_usage >> 8 & 0xFF)); md.update((byte) (ms_usage >> 16 & 0xFF));
Created: 2025-12-20 13:44 - Last Modified: 2025-08-16 01:32 - 9K bytes - Click Count (0) -
src/main/java/org/codelibs/core/crypto/CachedCipher.java
* @return the encrypted data */ public byte[] encrypt(final byte[] data) { final Cipher cipher = pollEncryptoCipher(); byte[] encrypted; try { encrypted = cipher.doFinal(data); } catch (final IllegalBlockSizeException e) { throw new IllegalBlockSizeRuntimeException(e); } catch (final BadPaddingException e) { throw new BadPaddingRuntimeException(e);Created: 2025-12-20 08:55 - Last Modified: 2025-11-22 11:21 - 15.9K bytes - Click Count (0) -
src/main/java/jcifs/pac/kerberos/KerberosEncData.java
cipher.init(Cipher.DECRYPT_MODE, dataKey); int plainDataLength = data.length - KerberosConstants.CHECKSUM_SIZE; byte[] plainData = cipher.doFinal(data, KerberosConstants.CHECKSUM_SIZE, plainDataLength); byte[] plainDataChecksum = getHmac(plainData, codeHmac); if (plainDataChecksum.length >= KerberosConstants.CHECKSUM_SIZE) {
Created: 2025-12-20 13:44 - Last Modified: 2025-08-16 01:32 - 12.5K bytes - Click Count (0) -
src/main/java/jcifs/internal/smb2/Smb2SigningDigest.java
Created: 2025-12-20 13:44 - Last Modified: 2025-08-30 05:58 - 9.9K bytes - Click Count (0) -
guava/src/com/google/common/hash/MacHashFunction.java
checkState(!done, "Cannot re-use a Hasher after calling hash() on it"); } @Override public HashCode hash() { checkNotDone(); done = true; return HashCode.fromBytesNoCopy(mac.doFinal()); } }
Created: 2025-12-26 12:43 - Last Modified: 2024-12-21 03:10 - 3.6K bytes - Click Count (0) -
src/main/java/jcifs/util/SecureCredentialStorage.java
GCMParameterSpec gcmSpec = new GCMParameterSpec(GCM_TAG_SIZE, iv); cipher.init(Cipher.ENCRYPT_MODE, masterKey, gcmSpec); // Encrypt byte[] ciphertext = cipher.doFinal(plaintextBytes); // Combine IV and ciphertext byte[] result = new byte[GCM_IV_SIZE + ciphertext.length]; System.arraycopy(iv, 0, result, 0, GCM_IV_SIZE);
Created: 2025-12-20 13:44 - Last Modified: 2025-08-30 05:58 - 12.7K bytes - Click Count (0) -
src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java
// Process message (will be encrypted) final byte[] output = new byte[cipher.getOutputSize(message.length)]; int len = cipher.processBytes(message, 0, message.length, output, 0); len += cipher.doFinal(output, len); // Split ciphertext and authentication tag final int tagLength = getAuthTagLength(); final byte[] ciphertext = new byte[message.length];Created: 2025-12-20 13:44 - Last Modified: 2025-08-31 08:00 - 35.5K bytes - Click Count (0)