package
0.0.0-20190722071344-ea1d8b2dbe68
Repository: https://github.com/arxanchain/sdk-go-common.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

DecryptAndVerify accepts data bytes and the specified enrollment id, decrypt the data and verify the signature according to the enrollmentId's certs, if success, return the raw plaintext data。.
No description provided by the author
GetCryptoLib can get the specific enrollment id's CryptoLib instance, then you can invoke following API use this Cryptolib instance: Sign(data []byte) ([]byte, error) Verify(data []byte, sig []byte) error Encrypt(data []byte) ([]byte, error) Decrypt(ciphertext []byte) ([]byte, error) .
NewCertsStore New and initialize the certs store, must be called before using crypto library parameters: path: path to the certs store witch contains all the enrollment id server-side certificates Certs Store Dir Structure: - root-dir: tls: tls.key enrollmentID1: enrollmentID1.cert enrollmentID2: enrollmentID2.cert .
SetEncryptFlag sets the encryption flag If not set, the default value is "true".
SetEncryptType sets the encryption type 0: ecc 1: rsa If not set, the default value is 0.
SetSecurityLevel sets the security level and hash algorithm of cryptp library If not set, the default value is: SecurityLevel: 256 HashAlgorithm: "SHA3".
SetServerClientMode sets the server or client mode 0: server mode 1: client mode If not set, the default value is 0.
SetSignFlag sets the signature falg If not set, the default value is "true".
SignAndEncrypt accepts data bytes and the specified enrollment id, sign and encrypt the data according to the enrollmentId's certs, if success, return the encrypted data.
VerifySignatureED25519 verify signature of the given data.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author