Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AesService ¶
type Base64Service ¶
type EncryptedContentService ¶
type EncryptedContentService interface { Serialize(encryptedContent *content.EncryptedContent) ([]byte, error) Deserialize(encoded []byte) (*content.EncryptedContent, error) Encrypt( passphrase *passphrase.Passphrase, content *content.Content, ) (*content.EncryptedContent, error) Decrypt( passphrase *passphrase.Passphrase, encryptedContent *content.EncryptedContent, ) (*content.Content, error) }
type EncryptedPassphraseService ¶
type EncryptedPassphraseService interface { GeneratePassphrase(length int) (*passphrase.Passphrase, error) Serialize(encryptedPassphrase *passphrase.EncryptedPassphrase) ([]byte, error) Deserialize(encoded []byte) (*passphrase.EncryptedPassphrase, error) Encrypt( useOAEP bool, publicKey *stdRsa.PublicKey, passphrase *passphrase.Passphrase, ) (*passphrase.EncryptedPassphrase, error) Decrypt( kmsKeyID string, privateKey *stdRsa.PrivateKey, encryptedPassphrase *passphrase.EncryptedPassphrase, ) (*passphrase.Passphrase, error) }
type EncryptedPayloadService ¶
type EncryptedPayloadService interface { Encrypt(useOAEP bool, publicKey *stdRsa.PublicKey, payload *payload.Payload) (*payload.EncryptedPayload, error) Decrypt(kmsKeyID string, privateKey *stdRsa.PrivateKey, encryptedPayload *payload.EncryptedPayload) (*payload.Payload, error) Serialize(encryptedPayload *payload.EncryptedPayload) ([]byte, error) Deserialize(encodedContent []byte) (*payload.EncryptedPayload, error) }
type HclService ¶
type RsaService ¶
type RsaService interface { ReadPublicKeyFromPath(publicKeyPath string) (*stdRsa.PublicKey, error) ReadPrivateKeyFromPath(privateKeyPath string) (*stdRsa.PrivateKey, error) DecryptPKCS1v15(rand io.Reader, priv *stdRsa.PrivateKey, ciphertext []byte) ([]byte, error) EncryptPKCS1v15(rand io.Reader, pub *stdRsa.PublicKey, msg []byte) ([]byte, error) EncryptOAEP(hash hash.Hash, random io.Reader, pub *stdRsa.PublicKey, msg []byte, label []byte) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.