|
SMSLib 3.5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.smslib.crypto.AKey
org.smslib.crypto.ASymmetricKey
public abstract class ASymmetricKey
Abstract class representing an encryption key of a symmetric encryption algorithm.
Constructor Summary | |
---|---|
ASymmetricKey()
|
Method Summary | |
---|---|
abstract byte[] |
decrypt(byte[] message)
Message decryption. |
abstract byte[] |
encrypt(byte[] message)
Message encryption. |
abstract javax.crypto.spec.SecretKeySpec |
generateKey()
Key generation. |
javax.crypto.spec.SecretKeySpec |
getKey()
Returns the encryption key. |
void |
setKey(javax.crypto.spec.SecretKeySpec key)
Sets the encryption key. |
Methods inherited from class org.smslib.crypto.AKey |
---|
asHex, asString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASymmetricKey()
Method Detail |
---|
public javax.crypto.spec.SecretKeySpec getKey()
public void setKey(javax.crypto.spec.SecretKeySpec key)
key
- The encryption key.public abstract javax.crypto.spec.SecretKeySpec generateKey() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public abstract byte[] encrypt(byte[] message) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException
message
- The message to be encrypted.
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
java.security.InvalidKeyException
public abstract byte[] decrypt(byte[] message) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException
message
- The message to be decrypted.
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
java.security.InvalidKeyException
|
SMSLib 3.5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |