2 Encryption/Decryption
Link to this section with
@secref["Encryption_Decryption"
#:doc '(lib "pure-crypto/scribble/pure-crypto.scrbl")]
Link to this section with
@secref["Encryption_Decryption"
#:doc '(lib "pure-crypto/scribble/pure-crypto.scrbl")]
(encrypt | | data | | | | key | | | [ | #:cipher? cipher? | | | | #:key_format? key_format? | | | | #:data_format? data_format? | | | | #:encrypted_format? encrypted_format? | | | | #:padding_mode? padding_mode? | | | | #:operation_mode? operation_mode? | | | | #:iv? iv? | | | | #:detail? detail?]) | |
|
→ (or/c #f string?) |
data : string? |
key : string? |
cipher? : (or/c 'des 'tdes 'aes) = 'des |
key_format? : (or/c 'hex 'base64 'utf-8) = 'utf-8 |
data_format? : (or/c 'hex 'base64 'utf-8) = 'utf-8 |
encrypted_format? : (or/c 'hex 'base64) = 'hex |
| padding_mode? | | : | | (or/c 'pkcs7 'zero 'no-padding 'ansix923 'iso10126) | | | | = | | 'pkcs7 |
|
operation_mode? : (or/c 'ecb 'cbc 'pcbc 'cfb 'ofb 'ctr) = 'cbc |
iv? : (or/c #f string?) = #f |
|
(decrypt | | data | | | | key | | | [ | #:cipher? cipher? | | | | #:key_format? key_format? | | | | #:data_format? data_format? | | | | #:encrypted_format? encrypted_format? | | | | #:padding_mode? padding_mode? | | | | #:operation_mode? operation_mode? | | | | #:iv? iv? | | | | #:detail? detail?]) | |
|
→ (or/c #f string?) |
data : string? |
key : string? |
cipher? : (or/c 'des 'tdes 'aes) = 'des |
key_format? : (or/c 'hex 'base64 'utf-8) = 'utf-8 |
data_format? : (or/c 'hex 'base64 'utf-8) = 'utf-8 |
encrypted_format? : (or/c 'hex 'base64) = 'hex |
| padding_mode? | | : | | (or/c 'pkcs7 'zero 'no-padding 'ansix923 'iso10126) | | | | = | | 'pkcs7 |
|
operation_mode? : (or/c 'ecb 'cbc 'pcbc 'cfb 'ofb 'ctr) = 'cbc |
iv? : (or/c #f string?) = #f |
|