/** * Builds a BlobCrypter from the specified master key * * @param masterKey */ public BasicBlobCrypter(byte[] masterKey) { init(masterKey); }
/** * Builds a BlobCrypter from the specified master key * * @param masterKey */ public BasicBlobCrypter(byte[] masterKey) { init(masterKey); }
public BasicBlobCrypter(String masterKey, @Nullable HMACType hmacType) { if (hmacType!= null) { this.hmacType = hmacType; } init(masterKey); }
public BasicBlobCrypter(String masterKey, @Nullable HMACType hmacType) { if (hmacType!= null) { this.hmacType = hmacType; } init(masterKey); }
public BasicBlobCrypter(byte[] masterKey, @Nullable HMACType hmacType) { if (hmacType!= null) { this.hmacType = hmacType; } init(masterKey); }
private void init(String masterKey) { if (masterKey == null) { throw new IllegalArgumentException("Unexpectedly empty masterKey:" + masterKey); } masterKey = masterKey.trim(); byte[] keyBytes = CharsetUtil.getUtf8Bytes(masterKey); init(keyBytes); }
public BasicBlobCrypter(String masterKey, @Nullable HMACType hmacType) { if (hmacType!= null) { this.hmacType = hmacType; } init(masterKey); }
private void init(String masterKey) { if (masterKey == null) { throw new IllegalArgumentException("Unexpectedly empty masterKey:" + masterKey); } masterKey = masterKey.trim(); byte[] keyBytes = CharsetUtil.getUtf8Bytes(masterKey); init(keyBytes); }
private void init(String masterKey) { if (masterKey == null) { throw new IllegalArgumentException("Unexpectedly empty masterKey:" + masterKey); } masterKey = masterKey.trim(); byte[] keyBytes = CharsetUtil.getUtf8Bytes(masterKey); init(keyBytes); }
public BasicBlobCrypter(byte[] masterKey, @Nullable HMACType hmacType) { if (hmacType!= null) { this.hmacType = hmacType; } init(masterKey); }
public BasicBlobCrypter(byte[] masterKey, @Nullable HMACType hmacType) { if (hmacType!= null) { this.hmacType = hmacType; } init(masterKey); }
public BasicBlobCrypter(File keyfile, @Nullable HMACType hmacType) throws IOException { if (hmacType!= null) { this.hmacType = hmacType; } BufferedReader reader = null; try { FileInputStream openFile = new FileInputStream(keyfile); reader = new BufferedReader(new InputStreamReader(openFile, Charsets.UTF_8)); init(reader.readLine()); } finally { try { if (reader != null) { reader.close(); } } catch (IOException e) { // oh well. } } }
public BasicBlobCrypter(File keyfile, @Nullable HMACType hmacType) throws IOException { if (hmacType!= null) { this.hmacType = hmacType; } BufferedReader reader = null; try { FileInputStream openFile = new FileInputStream(keyfile); reader = new BufferedReader(new InputStreamReader(openFile, Charsets.UTF_8)); init(reader.readLine()); } finally { try { if (reader != null) { reader.close(); } } catch (IOException e) { // oh well. } } }
public BasicBlobCrypter(File keyfile, @Nullable HMACType hmacType) throws IOException { if (hmacType!= null) { this.hmacType = hmacType; } BufferedReader reader = null; try { FileInputStream openFile = new FileInputStream(keyfile); reader = new BufferedReader(new InputStreamReader(openFile, Charsets.UTF_8)); init(reader.readLine()); } finally { try { if (reader != null) { reader.close(); } } catch (IOException e) { // oh well. } } }
init(keyBytes); } finally { try {
init(keyBytes); } finally { try {