public class OxalisCipherConverter extends Object
| Constructor and Description |
|---|
OxalisCipherConverter() |
| Modifier and Type | Method and Description |
|---|---|
OxalisCipher |
createCipherFromWrappedHexKey(String wrappedSymmetricKeyAsHexString,
PrivateKey privateKey)
Creates an instance of OxalisCipher:
Decodes the supplied hex string representation of a wrapped key into an array of bytes representation
Creates a cipher, which is initialized with a private key
Unwraps (decrypts) the secret key represented by an array of bytes into a SecretKey
Creates an OxalisCipher using the unwrapped SecretKey
|
String |
getWrappedSymmetricKeyAsString(PublicKey publicKey,
OxalisCipher oxalisCipher)
Encrypts the secret key (symmetric key) held inside the OxalisCipher instance using the supplied PublicKey, after
which the resulting wrapped secret key is transformed into a hex string suitable for transmission, persistence etc.
|
public OxalisCipher createCipherFromWrappedHexKey(String wrappedSymmetricKeyAsHexString, PrivateKey privateKey)
public String getWrappedSymmetricKeyAsString(PublicKey publicKey, OxalisCipher oxalisCipher)
publicKey - the public asymmetric key to use for encrypting the secret symmetric keyoxalisCipher - the instance of OxalisCipher in which the secret symmetric key is held.Copyright © 2022 NorStella. All rights reserved.