Returns a signature of the data, using SignNR (Nyberg-Rueppel), provided random data and hash algorithm SHA-256. On entry, rand should be a random number as byte array with bit length this.BitLength + 4. E.g. for curve 1 is BitLength is 160 bit, thus random data length must be 164 bit or 21 bytes. Random bytes are used in msb first order.

Namespace: BasicCard.Crypto.EC
Assembly: BasicCard (in BasicCard.dll) Version: 2.5.2.0 (2.5.2.0)

Syntax

C#
public byte[] HashAndSign(
	byte[] PrivateKey,
	byte[] Data,
	byte[] Rand
)
Visual Basic
Public Function HashAndSign ( 
	PrivateKey As Byte(),
	Data As Byte(),
	Rand As Byte()
) As Byte()
Visual C++
public:
virtual array<unsigned char>^ HashAndSign(
	array<unsigned char>^ PrivateKey, 
	array<unsigned char>^ Data, 
	array<unsigned char>^ Rand
) sealed
F#
abstract HashAndSign : 
        PrivateKey : byte[] * 
        Data : byte[] * 
        Rand : byte[] -> byte[] 
override HashAndSign : 
        PrivateKey : byte[] * 
        Data : byte[] * 
        Rand : byte[] -> byte[] 

Parameters

PrivateKey
Type: array<System..::..Byte>[]()[][]
Private key.
Data
Type: array<System..::..Byte>[]()[][]
Data to sign.
Rand
Type: array<System..::..Byte>[]()[][]
Random data to use.

Return Value

Type: array<Byte>[]()[][]
Signature.

Implements

EllipticCurve..::..HashAndSign(array<Byte>[]()[][], array<Byte>[]()[][], array<Byte>[]()[][])

Exceptions

See Also