MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / KeyDerivation

Function KeyDerivation

crypto/symmetric/aes.go:38–40  ·  view source on GitHub ↗

KeyDerivation does sha256 twice to password.

(password []byte, salt []byte)

Source from the content-addressed store, hash-verified

36
37// KeyDerivation does sha256 twice to password.
38func KeyDerivation(password []byte, salt []byte) (out []byte) {
39 return hash.DoubleHashB(append(password, salt...))
40}
41
42// EncryptWithPassword encrypts data with given password, iv will be placed
43// at head of cipher data.

Callers 4

EncryptFunction · 0.92
DecryptFunction · 0.92
EncryptWithPasswordFunction · 0.70
DecryptWithPasswordFunction · 0.70

Calls 1

DoubleHashBFunction · 0.92

Tested by

no test coverage detected