Module: Paseto::V2::Local
- Defined in:
- lib/paseto/local.rb
Defined Under Namespace
Classes: Key
Constant Summary collapse
- HEADER =
'v2.local'
- NONCE_BYTES =
RbNaCl::AEAD::XChaCha20Poly1305IETF.nonce_bytes
- NonceError =
Class.new(Paseto::Error)
Class Method Summary collapse
Class Method Details
.decrypt(token, key, footer = nil) ⇒ Object
81 82 83 |
# File 'lib/paseto/local.rb', line 81 def self.decrypt(token, key, = nil) key.decrypt(token, ) end |
.encrypt(message, key, footer = EMPTY_FOOTER) ⇒ Object
77 78 79 |
# File 'lib/paseto/local.rb', line 77 def self.encrypt(, key, = EMPTY_FOOTER) key.encrypt(, ) end |