diff --git a/cpp/src/tools/swtoolkit/site_scons/site_init.py b/cpp/src/tools/swtoolkit/site_scons/site_init.py index ba1b7256..c9ed220e 100644 --- a/cpp/src/tools/swtoolkit/site_scons/site_init.py +++ b/cpp/src/tools/swtoolkit/site_scons/site_init.py @@ -65,6 +65,8 @@ def _HostPlatform(): 'openbsd4': 'BSD', 'freebsd6': 'BSD', 'freebsd7': 'BSD', + 'freebsd8': 'BSD', + 'freebsd9': 'BSD', 'netbsd4': 'BSD', 'netbsd5': 'BSD', } diff --git a/python/src/keyczar/keyczar.py b/python/src/keyczar/keyczar.py index 91ddaa37..ee3f169c 100644 --- a/python/src/keyczar/keyczar.py +++ b/python/src/keyczar/keyczar.py @@ -776,11 +776,11 @@ def session_material(self): """ return self._encrypted_session_material - def Encrypt(self, plaintext): + def Encrypt(self, plaintext, encoder=util.Base64WSEncode): """ Encrypts the given plaintext with the session key and returns the base 64-encoded result. """ - return self._session.crypter.Encrypt(plaintext) + return self._session.crypter.Encrypt(plaintext, encoder) class SessionDecrypter(object): @@ -792,12 +792,12 @@ class SessionDecrypter(object): def __init__(self, crypter, session_material): self._session = _Session.LoadPackedKey(crypter.Decrypt(session_material)) - def Decrypt(self, ciphertext): + def Decrypt(self, ciphertext, decoder=util.Base64WSDecode): """ Decrypts the given base 64-encoded ciphertext with the session key and returns the decrypted plaintext. """ - return self._session.crypter.Decrypt(ciphertext) + return self._session.crypter.Decrypt(ciphertext, decoder) class SignedSessionEncrypter(object):