package
0.0.0-20241018223127-a062be16fda2
Repository: https://github.com/activestate/cli.git
Documentation: pkg.go.dev
# Functions
Delete will delete an unencrypted and encoded private key from the local config directory.
DeleteWithDefaults will call Delete with the default key name (i.e.
EncodeKeypair returns an EncodedKeypair using the provided Keypair and secures the private-key with a passphrase.
FetchPublicKey fetchs the PublicKey for a sepcific user.
FetchRaw fetchs the current user keypair or returns a failure.
GenerateAndSaveEncodedKeypair first Generates and then tries to Save an EncodedKeypair.
GenerateEncodedKeypair generates a new RSAKeypair, encrypts the private-key if a passphrase is provided, encodes the private and public keys, and returns they Keypair and encoded keys as an EncodedKeypair.
GenerateRSA will generate an RSAKeypair instance given a bit-length.
Load will attempt to load a Keypair using private and public-key files from the user's file system; specifically from the config dir.
LoadWithDefaults will call Load with the default key name (i.e.
LocalKeyFilename returns the full filepath for the given key name.
ParseEncryptedRSA will parse a PEM encoded RSAKeypair that is possibly encrypted with a passphrase.
ParseRSA will parse a PEM encoded RSAKeypair.
ParseRSAPublicKey will parse a PEM encoded RSAPublicKey.
Save will save the unencrypted and encoded private key to a local config file.
SaveEncodedKeypair stores an encoded Keypair back to the Secrets Service.
SaveWithDefaults will call Save with the provided keypair and the default key name (i.e.
# Constants
MinimumRSABitLength is the minimum allowed bit-length when generating RSA keys.
# Structs
EncodedKeypair encapulates a Keypair instance and the base-64 encodings on the public and private key components of that Keypair.
No description provided by the author
No description provided by the author
RSAKeypair implements a Keypair around an RSA private-key.
RSAPublicKey implements an Encrypter around an RSA public-key.
# Interfaces
No description provided by the author
Decrypter expects to Decrypt some ciphertext.
Encrypter expects to encrypt a message.
Keypair provides behavior for working with public crypto key-pairs.