ICipherSuitepublic interface ISymmetricCipherSuite extends ICipherSuite
| Modifier and Type | Method | Description |
|---|---|---|
IDecryptedInputStream |
createDecryptedInputStream(javax.crypto.SecretKey key,
byte[] encryptedData) |
|
IEncryptedOutputStream |
createEncryptedOutputStream(javax.crypto.SecretKey key) |
|
byte[] |
decrypt(javax.crypto.SecretKey key,
byte[] cipherText) |
Decrypt the given Base64 encoded cipher test using the given key.
|
byte[] |
encrypt(javax.crypto.SecretKey secretKey,
byte[] data) |
Encrypt the given binary data with the given key and return a Base64
encoded String containing the encrypted form.
|
javax.crypto.SecretKey |
generateKey() |
|
SymmetricCipher |
getId() |
Get the unique ID for this cipher suite.
|
int |
getKeySize(javax.crypto.SecretKey key) |
|
java.security.PrivateKey |
unwrap(byte[] cipherText,
javax.crypto.SecretKey userKey,
IAsymmetricCipherSuite cipherSuite) |
Unwrap the given encrypted PrivateKey
|
byte[] |
wrap(java.security.PrivateKey key,
javax.crypto.SecretKey userKey) |
Wrap the given asymmetric key by encrypting with the given user's secret key.
|
getCipher, getKeyAlgorithm, getKeySizeSymmetricCipher getId()
javax.crypto.SecretKey generateKey()
byte[] encrypt(javax.crypto.SecretKey secretKey,
byte[] data)
throws java.security.GeneralSecurityException
secretKey - Encryption keydata - Plain text.java.security.GeneralSecurityExceptionbyte[] decrypt(javax.crypto.SecretKey key,
byte[] cipherText)
throws java.security.GeneralSecurityException
key - Decryption key.cipherText - ciphertext.java.security.GeneralSecurityExceptionIDecryptedInputStream createDecryptedInputStream(javax.crypto.SecretKey key, byte[] encryptedData) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityExceptionjava.io.IOExceptionIEncryptedOutputStream createEncryptedOutputStream(javax.crypto.SecretKey key) throws java.io.IOException
java.io.IOExceptionbyte[] wrap(java.security.PrivateKey key,
javax.crypto.SecretKey userKey)
throws java.security.GeneralSecurityException
key - Key to be wrapped.userKey - Secret key of user for whom it is wrapped.java.security.GeneralSecurityExceptionjava.security.PrivateKey unwrap(byte[] cipherText,
javax.crypto.SecretKey userKey,
IAsymmetricCipherSuite cipherSuite)
throws java.security.GeneralSecurityException
cipherText - Encrypted key to be unwrapped.userKey - Wrapping key.cipherSuite - Wrapping cipherSuitejava.security.GeneralSecurityExceptionint getKeySize(javax.crypto.SecretKey key)
Copyright © 2018 Symphony Software Foundation. All rights reserved.