Пример #1
0
 @Nonnull
 public static SecretKeyProvider newAndroidAesSecretKeyProvider() {
   return Security.newPbeSecretKeyProvider(
       PBE_ITERATION_COUNT,
       PBE_ALGORITHM,
       CIPHERER_ALGORITHM_AES,
       PROVIDER,
       PBE_KEY_LENGTH,
       SALT_LENGTH);
 }
Пример #2
0
 @Nonnull
 public static SaltGenerator newAndroidSaltGenerator() {
   return Security.newSaltGenerator(IV_RANDOM_ALGORITHM, SALT_LENGTH);
 }
Пример #3
0
 @Nonnull
 public static HashProvider<byte[], byte[]> newAndroidSha512ByteHashProvider() {
   return Security.newHashProvider(HASH_ALGORITHM, PROVIDER);
 }
Пример #4
0
 @Nonnull
 public static Cipherer<byte[], byte[]> newAndroidAesByteCipherer(final byte[] initialVector) {
   return Security.newCipherer(
       CIPHER_ALGORITHM, PROVIDER, InitialVectorDef.newPredefined(initialVector));
 }
Пример #5
0
 @Nonnull
 public static Cipherer<byte[], byte[]> newAndroidAesByteCipherer() {
   return Security.newCipherer(
       CIPHER_ALGORITHM, PROVIDER, InitialVectorDef.newRandom(IV_RANDOM_ALGORITHM, IV_LENGTH));
 }