Class DHBufferHandler
- java.lang.Object
-
- org.dcache.xrootd.plugins.authn.gsi.DHBufferHandler
-
- All Implemented Interfaces:
BufferDecrypter,BufferEncrypter
public class DHBufferHandler extends java.lang.Object implements BufferEncrypter, BufferDecrypter
Uses established shared secret from a Diffie Hellman session to encrypt or decrypt the buffer.
-
-
Constructor Summary
Constructors Constructor Description DHBufferHandler(DHSession session, java.lang.String cipherSpec, java.lang.String keySpec, int blocksize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(byte[] encrypted)byte[]encrypt(byte[] unencrypted)
-
-
-
Constructor Detail
-
DHBufferHandler
public DHBufferHandler(DHSession session, java.lang.String cipherSpec, java.lang.String keySpec, int blocksize)
-
-
Method Detail
-
decrypt
public byte[] decrypt(byte[] encrypted) throws java.security.InvalidKeyException, java.lang.IllegalStateException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidAlgorithmParameterException, java.security.NoSuchProviderException- Specified by:
decryptin interfaceBufferDecrypter- Throws:
java.security.InvalidKeyExceptionjava.lang.IllegalStateExceptionjava.security.NoSuchAlgorithmExceptionjavax.crypto.NoSuchPaddingExceptionjavax.crypto.IllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionjava.security.InvalidAlgorithmParameterExceptionjava.security.NoSuchProviderException
-
encrypt
public byte[] encrypt(byte[] unencrypted) throws java.security.InvalidKeyException, java.lang.IllegalStateException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidAlgorithmParameterException, java.security.NoSuchProviderException- Specified by:
encryptin interfaceBufferEncrypter- Throws:
java.security.InvalidKeyExceptionjava.lang.IllegalStateExceptionjava.security.NoSuchAlgorithmExceptionjavax.crypto.NoSuchPaddingExceptionjavax.crypto.IllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionjava.security.InvalidAlgorithmParameterExceptionjava.security.NoSuchProviderException
-
-