Method | Description | |
---|---|---|
GenerateKeyPair ( string password, bool writeOutputFiles = false, string outputFolder = "", string keyPairFileName = "minisign" ) : |
Generate a new Minisign key pair.
|
|
LoadPrivateKey ( byte privateKey, byte password ) : |
Load a public key into a MinisignPublicKey object.
|
|
LoadPrivateKeyFromFile ( string privateKeyFile, string password ) : |
Load a private key from a file into a MinisignPrivateKey object.
|
|
LoadPrivateKeyFromString ( string privateKeyString, string password ) : |
Load a private key from a string into a MinisignPrivateKey object.
|
|
LoadPublicKey ( byte publicKey ) : |
Load a public key into a MinisignPublicKey object.
|
|
LoadPublicKeyFromFile ( string publicKeyFile ) : |
Load a public key from a file into a MinisignPublicKey object.
|
|
LoadPublicKeyFromString ( string publicKeyString ) : |
Load a public key from a string into a MinisignPublicKey object.
|
|
LoadSignature ( byte signature, byte trustedComment, byte globalSignature ) : |
Load a signature into a MinisignSignature object.
|
|
LoadSignatureFromFile ( string signatureFile ) : |
Load a signature from a file into a MinisignSignature object.
|
|
LoadSignatureFromString ( string signatureString, string trustedComment, string globalSignature ) : |
Load a signature from strings into a MinisignSignature object.
|
|
Sign ( string fileToSign, |
Sign a file with a MinisignPrivateKey.
|
|
ValidateSignature ( byte message, |
Validate a file with a MinisignSignature and a MinisignPublicKey object.
|
|
ValidateSignature ( string filePath, |
Validate a file with a MinisignSignature and a MinisignPublicKey object.
|
Method | Description | |
---|---|---|
GetTimestamp ( ) : int |
Get the current Unix Timestamp.
|
|
LoadMessageFile ( string messageFile ) : byte[] |
Loads a file into memory.
|
public static GenerateKeyPair ( string password, bool writeOutputFiles = false, string outputFolder = "", string keyPairFileName = "minisign" ) : |
||
password | string | The password to protect the secret key. |
writeOutputFiles | bool | If false, no files will be written. |
outputFolder | string | The folder to write the files (optional). |
keyPairFileName | string | The name of the files to write (optional). |
return |
public static LoadPrivateKey ( byte privateKey, byte password ) : |
||
privateKey | byte | A valid private key. |
password | byte | The password to decrypt the private key. |
return |
public static LoadPrivateKeyFromFile ( string privateKeyFile, string password ) : |
||
privateKeyFile | string | The full path to to the private key file. |
password | string | The password to decrypt the private key. |
return |
public static LoadPrivateKeyFromString ( string privateKeyString, string password ) : |
||
privateKeyString | string | A valid Base64 string. |
password | string | The password to decrypt the private key. |
return |
public static LoadPublicKey ( byte publicKey ) : |
||
publicKey | byte | A valid public key. |
return |
public static LoadPublicKeyFromFile ( string publicKeyFile ) : |
||
publicKeyFile | string | The full path to the public key file. |
return |
public static LoadPublicKeyFromString ( string publicKeyString ) : |
||
publicKeyString | string | A valid base64 public key string. |
return |
public static LoadSignature ( byte signature, byte trustedComment, byte globalSignature ) : |
||
signature | byte | A valid signature. |
trustedComment | byte | The associated trustedComment. |
globalSignature | byte | The associated globalSignature. |
return |
public static LoadSignatureFromFile ( string signatureFile ) : |
||
signatureFile | string | The full path to the signature file. |
return |
public static LoadSignatureFromString ( string signatureString, string trustedComment, string globalSignature ) : |
||
signatureString | string | A valid base64 signature string. |
trustedComment | string | The associated trusted comment. |
globalSignature | string | The associated base64 global signature string. |
return |
public static Sign ( string fileToSign, |
||
fileToSign | string | The full path to the file. |
minisignPrivateKey | A valid MinisignPrivateKey to sign. | |
untrustedComment | string | An optional untrusted comment. |
trustedComment | string | An optional trusted comment. |
outputFolder | string | The folder to write the signature (optional). |
return | string |
public static ValidateSignature ( byte message, |
||
message | byte | The message to validate. |
signature | A valid MinisignSignature object. | |
publicKey | A valid MinisignPublicKey object. | |
return | bool |
public static ValidateSignature ( string filePath, |
||
filePath | string | The full path to the file. |
signature | A valid MinisignSignature object. | |
publicKey | A valid MinisignPublicKey object. | |
return | bool |