Class Ed25519SignJce
- java.lang.Object
-
- com.google.crypto.tink.signature.internal.Ed25519SignJce
-
- All Implemented Interfaces:
PublicKeySign
@Immutable public final class Ed25519SignJce extends java.lang.Object implements PublicKeySign
Ed25519 signing using the JCE.Can currently only be used when the Conscrypt provider is available.
-
-
Field Summary
Fields Modifier and Type Field Description static TinkFipsUtil.AlgorithmFipsCompatibilityFIPSstatic intSECRET_KEY_LENstatic intSIGNATURE_LEN
-
Constructor Summary
Constructors Constructor Description Ed25519SignJce(byte[] privateKey)Constructs a Ed25519SignJce with theprivateKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PublicKeySigncreate(Ed25519PrivateKey key)static PublicKeySigncreateWithProvider(Ed25519PrivateKey key, java.security.Provider provider)static booleanisSupported()Returns true if the Conscrypt is available and supports Ed25519.byte[]sign(byte[] data)Computes the signature fordata.
-
-
-
Field Detail
-
FIPS
public static final TinkFipsUtil.AlgorithmFipsCompatibility FIPS
-
SECRET_KEY_LEN
public static final int SECRET_KEY_LEN
- See Also:
- Constant Field Values
-
SIGNATURE_LEN
public static final int SIGNATURE_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static PublicKeySign create(Ed25519PrivateKey key) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
createWithProvider
public static PublicKeySign createWithProvider(Ed25519PrivateKey key, java.security.Provider provider) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
isSupported
public static boolean isSupported()
Returns true if the Conscrypt is available and supports Ed25519.
-
sign
public byte[] sign(byte[] data) throws java.security.GeneralSecurityExceptionDescription copied from interface:PublicKeySignComputes the signature fordata.- Specified by:
signin interfacePublicKeySign- Returns:
- the signature of
data - Throws:
java.security.GeneralSecurityException
-
-