Method: RCrypt.encrypt
- Defined in:
- lib/rcrypt.rb
.encrypt(plaintext, pub_key = @public_key) ⇒ Object
39 40 41 42 |
# File 'lib/rcrypt.rb', line 39 def encrypt(plaintext, pub_key = @public_key) raise CryptException.new("No public key specified.") unless pub_key Base64.encode64 key(pub_key).public_encrypt(plaintext) end |