public static interface Sign.Lazy
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
convertKeyPairEd25519ToCurve25519(KeyPair ed25519KeyPair)
Converts a ed25519 keypair to a curve25519 keypair.
|
java.lang.String |
cryptoSign(java.lang.String message,
Key secretKey)
Sign a message.
|
java.lang.String |
cryptoSign(java.lang.String message,
java.lang.String secretKey)
Sign a message.
|
java.lang.String |
cryptoSignDetached(java.lang.String message,
Key secretKey)
Returns a signature for a message.
|
KeyPair |
cryptoSignKeypair()
Generate a signing keypair (ed25519).
|
java.lang.String |
cryptoSignOpen(java.lang.String signedMessage,
Key publicKey)
Checks that a message is validly signed by a public key.
|
KeyPair |
cryptoSignSecretKeyPair(Key secretKey)
Generate a signing keypair (ed25519), given a secret ed25519 key.
|
KeyPair |
cryptoSignSeedKeypair(byte[] seed)
Generate a signing keypair deterministically.
|
boolean |
cryptoSignVerifyDetached(java.lang.String signature,
java.lang.String message,
Key publicKey)
Verifies that
signature is valid for the
message. |
KeyPair cryptoSignKeypair() throws SodiumException
SodiumExceptionKeyPair cryptoSignSeedKeypair(byte[] seed) throws SodiumException
seed - The seed to generate keys.SodiumExceptionKeyPair cryptoSignSecretKeyPair(Key secretKey) throws SodiumException
secretKey - The ed25519 secret key.SodiumExceptionjava.lang.String cryptoSign(java.lang.String message,
java.lang.String secretKey)
throws SodiumException
message - The message to sign.secretKey - The secret key.Helpers.Lazy.sodiumBin2Hex(byte[])-ified signed message.SodiumExceptionjava.lang.String cryptoSign(java.lang.String message,
Key secretKey)
throws SodiumException
message - The message to sign.secretKey - The secret key.Helpers.Lazy.sodiumBin2Hex(byte[])-ified signed message.SodiumExceptionjava.lang.String cryptoSignOpen(java.lang.String signedMessage,
Key publicKey)
signedMessage - The signed message.publicKey - The public key that signed the message.java.lang.String cryptoSignDetached(java.lang.String message,
Key secretKey)
throws SodiumException
cryptoSign(String, String) for that.message - The message to sign.secretKey - The secret key.SodiumException - If could not sign.boolean cryptoSignVerifyDetached(java.lang.String signature,
java.lang.String message,
Key publicKey)
signature is valid for the
message.signature - The signature.message - The message.publicKey - The public key that signed the message.cryptoSignDetached(String, Key)KeyPair convertKeyPairEd25519ToCurve25519(KeyPair ed25519KeyPair) throws SodiumException
ed25519KeyPair - The key pair.SodiumException - If conversion was unsuccessful.