public class Encryption extends Object
| Constructor and Description |
|---|
Encryption() |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
getDecryptedInputStream(InputStream encryptedInputStream,
byte[] keyData,
byte[] ivData)
Create a decrypted input stream from an encrypted one
|
static byte[] |
getDigest(String string)
Gets a digest for a UTF-8 encoded string
|
static byte[] |
getDigest(String string,
String encoding)
Gets a digest for a string
|
static OutputStream |
getEncryptedOutputStream(OutputStream decryptedOutputStream,
byte[] keyData,
byte[] ivData)
Create an encrypted output stream from an unencrypted output stream
|
static byte[] |
getFinalKeyDigest(byte[] key,
byte[] masterSeed,
byte[] transformSeed,
long transformRounds)
Create a final key from the parameters passed
|
static MessageDigest |
getMessageDigestInstance()
Gets a SHA-256 message digest instance
|
public static byte[] getDigest(String string)
string - the stringpublic static byte[] getDigest(String string, String encoding)
string - the stringencoding - the encoding of the Stringpublic static MessageDigest getMessageDigestInstance()
public static byte[] getFinalKeyDigest(byte[] key,
byte[] masterSeed,
byte[] transformSeed,
long transformRounds)
public static InputStream getDecryptedInputStream(InputStream encryptedInputStream, byte[] keyData, byte[] ivData)
public static OutputStream getEncryptedOutputStream(OutputStream decryptedOutputStream, byte[] keyData, byte[] ivData)
Copyright © 2018. All rights reserved.