Class DSMACipher
- java.lang.Object
-
- com.fortanix.sdkms.jce.provider.ciphers.DSMACipher
-
public class DSMACipher extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDSMACipher.CipherAndTag
-
Constructor Summary
Constructors Constructor Description DSMACipher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidattachGCMTag(ByteArrayOutputStream cipherStream, com.fortanix.sdkms.v1.model.CryptMode mode, byte[] gcmTag, int expectedTagLength)Prefix gcm tag to cipher textstatic byte[]decrypt(Integer tagLength, com.fortanix.sdkms.v1.model.DecryptRequestEx decryptRequest)static byte[]encrypt(com.fortanix.sdkms.v1.model.EncryptRequestEx encryptRequest)static DSMACipher.CipherAndTagextractGCMTag(int tagLength, byte[] cipherTagBytes, int cipherTagOffset, int cipherTagLen)static booleanisGCM(com.fortanix.sdkms.v1.model.CryptMode mode)
-
-
-
Method Detail
-
attachGCMTag
public static void attachGCMTag(ByteArrayOutputStream cipherStream, com.fortanix.sdkms.v1.model.CryptMode mode, byte[] gcmTag, int expectedTagLength) throws IOException
Prefix gcm tag to cipher text- Parameters:
cipherStream-mode-gcmTag-expectedTagLength- gcmTag.length should match to this- Throws:
IOException
-
encrypt
public static byte[] encrypt(com.fortanix.sdkms.v1.model.EncryptRequestEx encryptRequest)
-
decrypt
public static byte[] decrypt(Integer tagLength, com.fortanix.sdkms.v1.model.DecryptRequestEx decryptRequest)
-
isGCM
public static boolean isGCM(com.fortanix.sdkms.v1.model.CryptMode mode)
-
extractGCMTag
public static DSMACipher.CipherAndTag extractGCMTag(int tagLength, byte[] cipherTagBytes, int cipherTagOffset, int cipherTagLen)
-
-