|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.crypto.Cipher
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class Cipher
A common interface for a cryptographic algorithm.
Constructor Summary | |
---|---|
Cipher(CipherProvider provider)
|
Method Summary | |
---|---|
abstract InputStream |
createDecryptionStream(InputStream in,
Context context,
byte[] iv)
Create a decrypting input stream given a context and IV |
abstract InputStream |
createDecryptionStream(InputStream in,
Decryptor decryptor)
Create a decrypting output stream given an initialized decryptor |
abstract OutputStream |
createEncryptionStream(OutputStream out,
Context context,
byte[] iv)
Create an encrypting output stream given a context and IV |
abstract OutputStream |
createEncryptionStream(OutputStream out,
Encryptor encryptor)
Create an encrypting output stream given an initialized encryptor |
abstract Decryptor |
getDecryptor()
Return a decryptor for decrypting data. |
abstract Encryptor |
getEncryptor()
Get an encryptor for encrypting data. |
abstract int |
getIvLength()
Return the expected initialization vector length, in bytes, or 0 if not applicable |
abstract int |
getKeyLength()
Return the key length required by this cipher, in bytes |
abstract String |
getName()
Return this Cipher's name |
CipherProvider |
getProvider()
Return the provider for this Cipher |
abstract Key |
getRandomKey()
Create a random symmetric key |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cipher(CipherProvider provider)
Method Detail |
---|
public CipherProvider getProvider()
public abstract String getName()
public abstract int getKeyLength()
public abstract int getIvLength()
public abstract Key getRandomKey()
public abstract Encryptor getEncryptor()
public abstract Decryptor getDecryptor()
public abstract OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv) throws IOException
out
- the output stream to wrapcontext
- the encryption contextiv
- initialization vector
IOException
public abstract OutputStream createEncryptionStream(OutputStream out, Encryptor encryptor) throws IOException
out
- the output stream to wrapencryptor
- the encryptor
IOException
public abstract InputStream createDecryptionStream(InputStream in, Context context, byte[] iv) throws IOException
in
- the input stream to wrapcontext
- the encryption contextiv
- initialization vector
IOException
public abstract InputStream createDecryptionStream(InputStream in, Decryptor decryptor) throws IOException
in
- the input stream to wrapdecryptor
- the decryptor
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |