public class Encryption extends Object
Also, some convenience utilities that hide the checked exceptions that would otherwise need to be checked for when using digests.
Modifier and Type | Class and Description |
---|---|
static class |
Encryption.Cipher
A list of ciphers that we may apply to the database contents.
|
static class |
Encryption.KeyDerivationFunction
A list of functions that we can use to transform keys
Enum constants forward to underlying implementation.
|
static class |
Encryption.ProtectedStreamAlgorithm
The ordinals represent various types of encryption that may
be applied to fields within the unencrypted data
|
Constructor and Description |
---|
Encryption() |
Modifier and Type | Method and Description |
---|---|
static Mac |
getHMacSha256Instance(byte[] key)
Gets an HMacSha256 Mac
|
static MessageDigest |
getSha256MessageDigestInstance()
Gets a SHA-256 message digest instance
|
static MessageDigest |
getSha512MessageDigestInstance()
Gets a SHA-512 message digest instance
|
static byte[] |
transformHmacKey(byte[] digest,
byte[] transform)
From HmacBlockStream.cs GetHmacKey64
Calculates the block key for the block number ...
|
public static MessageDigest getSha256MessageDigestInstance()
public static MessageDigest getSha512MessageDigestInstance()
public static Mac getHMacSha256Instance(byte[] key)
key
- the keypublic static byte[] transformHmacKey(byte[] digest, byte[] transform)
digest
- the HMAC key digesttransform
- the transform seed (the block number, 8 bytes)Copyright © 2023. All rights reserved.