Example usage for org.bouncycastle.math.ec.rfc8032 Ed448 SIGNATURE_SIZE

List of usage examples for org.bouncycastle.math.ec.rfc8032 Ed448 SIGNATURE_SIZE

Introduction

In this page you can find the example usage for org.bouncycastle.math.ec.rfc8032 Ed448 SIGNATURE_SIZE.

Prototype

int SIGNATURE_SIZE

To view the source code for org.bouncycastle.math.ec.rfc8032 Ed448 SIGNATURE_SIZE.

Click Source Link

Usage

From source file:net.java.otr4j.crypto.ed448.EdDSAKeyPair.java

License:LGPL

/**
 * Sign message./*from ww w .  j  a va2 s .  c om*/
 * <p>
 * Signs the message using the default context as used in OTRv4.
 *
 * @param message The message to be signed.
 * @return Returns the signature that corresponds to the message.
 */
@Nonnull
public byte[] sign(final byte[] message) {
    requireNotCleared();
    final byte[] signature = new byte[Ed448.SIGNATURE_SIZE];
    Ed448.sign(this.symmetricKey, 0, ED448_CONTEXT, message, 0, message.length, signature, 0);
    return signature;
}