Method: JOSE::JWE::ALG_PBES2#algorithm
- Defined in:
- lib/jose/jwe/alg_pbes2.rb
#algorithm ⇒ Object
API functions
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/jose/jwe/alg_pbes2.rb', line 92 def algorithm if hmac == OpenSSL::Digest::SHA256 'PBES2-HS256+A128KW' elsif hmac == OpenSSL::Digest::SHA384 'PBES2-HS384+A192KW' elsif hmac == OpenSSL::Digest::SHA512 'PBES2-HS512+A256KW' else raise ArgumentError, "unhandled JOSE::JWE::ALG_PBES2 hmac: #{hmac.inspect}" end end |