org.apache.hadoop.hbase.io.crypto
Interface Encryptor

All Known Implementing Classes:
AESEncryptor

@InterfaceAudience.Public
@InterfaceStability.Unstable
public interface Encryptor

Encryptors apply a cipher to an OutputStream to produce ciphertext.


Method Summary
 OutputStream createEncryptionStream(OutputStream out)
          Create a stream for encryption
 int getBlockSize()
          Get the cipher's internal block size
 byte[] getIv()
          Get the initialization vector
 int getIvLength()
          Get the expected length for the initialization vector
 void reset()
          Reset state, reinitialize with the key and iv
 void setIv(byte[] iv)
          Set the initialization vector
 void setKey(Key key)
          Set the secret key
 

Method Detail

setKey

void setKey(Key key)
Set the secret key

Parameters:
key -

getIvLength

int getIvLength()
Get the expected length for the initialization vector

Returns:
the expected length for the initialization vector

getBlockSize

int getBlockSize()
Get the cipher's internal block size

Returns:
the cipher's internal block size

getIv

byte[] getIv()
Get the initialization vector


setIv

void setIv(byte[] iv)
Set the initialization vector

Parameters:
iv -

createEncryptionStream

OutputStream createEncryptionStream(OutputStream out)
Create a stream for encryption

Parameters:
out -

reset

void reset()
Reset state, reinitialize with the key and iv



Copyright © 2015 The Apache Software Foundation. All Rights Reserved.