Documentation
¶
Index ¶
Constants ¶
const Algorithm = "RSA-OAEP-SHA512"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RSA ¶
type RSA struct {
// contains filtered or unexported fields
}
RSA implements the crypto.Cipher interface using RSA public/private key algorithm as specified in PKCS #1. Messages are encrypted with the public key and can only be decrypted using the private key. RSA objects must have a public key but the private key is only required for decryption.
func New ¶
New creates an RSA Crypto handler with the specified key pair. If the cipher is only being used for encryption, simply pass the public key: New(pub *rsa.PublicKey); If the cipher is being used for decryption, then pass the private key: New(key *rsa.PrivateKey).
func (*RSA) EncryptionAlgorithm ¶
EncryptionAlgorithm returns the name of the algorithm for adding to the Transaction.
func (*RSA) PublicKeySignature ¶ added in v0.3.3
PublicKeySignature implements KeyIdentifier by computing a base64 encoded SHA-256 hash of the public key serialized as a PKIX public key without PEM encoding. This is a prototype method of computing the public key signature and may not match other external signature computation methods.