Package ddf.security.encryption.crypter
Class Crypter
java.lang.Object
ddf.security.encryption.crypter.Crypter
A "crypter" combines an "encryptor" and a "decryptor". This class is responsible for abstracting
underlying cryptography implementations for use throughout the system.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] encryptedBytes) Decrypts a plain text value using Tink.decrypt(InputStream encryptedInputStream) Decrypts an encrypted InputStream using Tink.Decrypts a plain text value using Tink.byte[]encrypt(byte[] plainBytes) Encrypts a plain text value using Tink.encrypt(InputStream plainInputStream) Encrypts a plain InputStream using Tink.Encrypts a plain text value using Tink.
-
Constructor Details
-
Crypter
Read/create a specified keyset under the keyset directory.- Parameters:
keysetFileName- name of the keyset to read/create.- Throws:
Crypter.CrypterException
-
Crypter
- Throws:
Crypter.CrypterException
-
-
Method Details
-
encrypt
Encrypts a plain text value using Tink.- Parameters:
plainBytes- The value to encrypt.- Throws:
Crypter.CrypterException
-
decrypt
Decrypts a plain text value using Tink.- Parameters:
encryptedBytes- The value to decrypt.- Throws:
Crypter.CrypterException
-
encrypt
Encrypts a plain text value using Tink.- Parameters:
plainTextValue- The value to encrypt.- Throws:
Crypter.CrypterException
-
decrypt
Decrypts a plain text value using Tink.- Parameters:
encryptedValue- The value to decrypt.- Throws:
Crypter.CrypterException
-
encrypt
Encrypts a plain InputStream using Tink.- Parameters:
plainInputStream- The InputStream to encrypt.- Throws:
Crypter.CrypterException
-
decrypt
Decrypts an encrypted InputStream using Tink.- Parameters:
encryptedInputStream- The InputStream to decrypt.- Throws:
Crypter.CrypterException
-