MCPcopy
hub / github.com/ory/kratos / Encrypt

Method Encrypt

cipher/cipher.go:14–14  ·  view source on GitHub ↗

Encrypt encrypts the (binary) message and returns a hex-encoded binary ciphertext or an error if the encryption failed. If the message is empty, the ciphertext is also empty and no error is returned.

(ctx context.Context, message []byte)

Source from the content-addressed store, hash-verified

12 //
13 // If the message is empty, the ciphertext is also empty and no error is returned.
14 Encrypt(ctx context.Context, message []byte) (string, error)
15
16 // Decrypt takes a hex-encoded binary ciphertext and decrypts it or returns an error if the decryption
17 // failed.

Callers 9

EncryptMethod · 0.65
testAllWorkFunction · 0.65
handler_test.goFile · 0.65
TestPersisterFunction · 0.65
TestHandlerFunction · 0.65
TestGetCmdFunction · 0.65
encryptOAuth2TokensMethod · 0.65
encryptStateFunction · 0.65
SetLinkHeaderFunction · 0.65

Implementers 3

XChaCha20Poly1305cipher/chacha20.go
AEScipher/aes.go
Noopcipher/noop.go

Calls

no outgoing calls

Tested by 4

testAllWorkFunction · 0.52
TestPersisterFunction · 0.52
TestHandlerFunction · 0.52
TestGetCmdFunction · 0.52