Ed25519Signer.fromKeyBytes constructor

Ed25519Signer.fromKeyBytes(
  1. List<int> keyBytes
)

Factory method to create an Ed25519Signer instance from key bytes.

Implementation

factory Ed25519Signer.fromKeyBytes(List<int> keyBytes) {
  // Create an EDDSA private key from the key bytes using the ED25519 curve.
  final signingKey = EDDSAPrivateKey(
      generator: CryptoSignerConst.generatorED25519,
      privateKey: keyBytes,
      type: EllipticCurveTypes.ed25519);
  return Ed25519Signer._(signingKey);
}