Package convex.core.crypto.bc
Class BCKeyPair
java.lang.Object
convex.core.crypto.AKeyPair
convex.core.crypto.bc.BCKeyPair
Class representing an Ed25519 Key Pair using Sodium library
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.bouncycastle.crypto.params.Ed25519PrivateKeyParametersSecret key in the specific format that Sodium expects, we wrap this complexity in this classstatic longFields inherited from class convex.core.crypto.AKeyPair
ED25519, SEED_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionstatic BCKeyPairbooleanTests if this keypair is equal to another key pair.booleanGets the Account Public Key of this KeyPairgetSeed()Gets the Ed25519 seed for this key pairsign(AArrayBlob hash) Signs a hash value with this key pair, producing a signature of the appropriate type.<R extends ACell>
SignedData<R>signData(R value) Signs a value with this key pairMethods inherited from class convex.core.crypto.AKeyPair
create, create, create, create, createSeeded, equals, extractAccountKey, extractSeed, generate, getJCAKeyPair, getPrivate, getPublic, getPublicKeyBytes, privateFromBytes, privateKeyFromBlob, privateKeyFromBytes, publicKeyFromBytes, toString
-
Field Details
-
priv
protected final org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters privSecret key in the specific format that Sodium expects, we wrap this complexity in this class -
signatureCount
public static long signatureCount
-
-
Method Details
-
create
-
getSeed
Description copied from class:AKeyPairGets the Ed25519 seed for this key pair -
getAccountKey
Description copied from class:AKeyPairGets the Account Public Key of this KeyPair- Specified by:
getAccountKeyin classAKeyPair- Returns:
- AccountKey for this KeyPair
-
signData
Description copied from class:AKeyPairSigns a value with this key pair -
sign
Description copied from class:AKeyPairSigns a hash value with this key pair, producing a signature of the appropriate type. -
equals
Description copied from class:AKeyPairTests if this keypair is equal to another key pair. Generally, a key pair should be considered equal if it has the same public key and produces identical signatures in all cases. -
equals
-