Routines for URL-safe encrypting/decrypting
glance.common.crypt.
urlsafe_decrypt
(key, ciphertext)[source]¶Decrypts URL-safe base64 encoded ciphertext. On Python 3, the result is decoded from UTF-8.
key – AES secret key
ciphertext – The encrypted text to decrypt
Resulting plaintext
glance.common.crypt.
urlsafe_encrypt
(key, plaintext, blocksize=16)[source]¶Encrypts plaintext. Resulting ciphertext will contain URL-safe characters. If plaintext is Unicode, encode it to UTF-8 before encryption.
key – AES secret key
plaintext – Input text to be encrypted
blocksize – Non-zero integer multiple of AES blocksize in bytes (16)
Resulting ciphertext
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.