Java 类org.apache.hadoop.hbase.io.crypto.Context 实例源码

项目:ditb    文件:AES.java   
@Override
public OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Encryptor e = getEncryptor();
  e.setKey(context.getKey());
  e.setIv(iv);
  return e.createEncryptionStream(out);
}
项目:ditb    文件:AES.java   
@Override
public InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Decryptor d = getDecryptor();
  d.setKey(context.getKey());
  d.setIv(iv);
  return d.createDecryptionStream(in);
}
项目:pbase    文件:AES.java   
@Override
public OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Encryptor e = getEncryptor();
  e.setKey(context.getKey());
  e.setIv(iv);
  return e.createEncryptionStream(out);
}
项目:pbase    文件:AES.java   
@Override
public InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Decryptor d = getDecryptor();
  d.setKey(context.getKey());
  d.setIv(iv);
  return d.createDecryptionStream(in);
}
项目:HIndex    文件:AES.java   
@Override
public OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Encryptor e = getEncryptor();
  e.setKey(context.getKey());
  e.setIv(iv);
  return e.createEncryptionStream(out);
}
项目:HIndex    文件:AES.java   
@Override
public InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Decryptor d = getDecryptor();
  d.setKey(context.getKey());
  d.setIv(iv);
  return d.createDecryptionStream(in);
}
项目:hbase    文件:CommonsCryptoAES.java   
@Override
public OutputStream createEncryptionStream(OutputStream out, Context context,
                                           byte[] iv) throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Encryptor e = getEncryptor();
  e.setKey(context.getKey());
  e.setIv(iv);
  return e.createEncryptionStream(out);
}
项目:hbase    文件:CommonsCryptoAES.java   
@Override
public InputStream createDecryptionStream(InputStream in, Context context,
                                          byte[] iv) throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Decryptor d = getDecryptor();
  d.setKey(context.getKey());
  d.setIv(iv);
  return d.createDecryptionStream(in);
}
项目:hbase    文件:AES.java   
@Override
public OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Encryptor e = getEncryptor();
  e.setKey(context.getKey());
  e.setIv(iv);
  return e.createEncryptionStream(out);
}
项目:hbase    文件:AES.java   
@Override
public InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Decryptor d = getDecryptor();
  d.setKey(context.getKey());
  d.setIv(iv);
  return d.createDecryptionStream(in);
}
项目:PyroDB    文件:AES.java   
@Override
public OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Encryptor e = getEncryptor();
  e.setKey(context.getKey());
  e.setIv(iv);
  return e.createEncryptionStream(out);
}
项目:PyroDB    文件:AES.java   
@Override
public InputStream createDecryptionStream(InputStream in, Context context, byte[] iv)
    throws IOException {
  Preconditions.checkNotNull(context);
  Preconditions.checkState(context.getKey() != null, "Context does not have a key");
  Preconditions.checkNotNull(iv);
  Decryptor d = getDecryptor();
  d.setKey(context.getKey());
  d.setIv(iv);
  return d.createDecryptionStream(in);
}