protocol
paseto_protocol
PASETO v4.local and v4.public protocol for byte payloads.
logtalk_load(paseto(loader))staticPublic predicates
local_key/1
Generates a 32-byte v4.local key.
staticlocal_key(Key)local_key(-list(byte)) - onepublic_keypair/2
Generates an Ed25519 seed and public key for v4.public tokens.
staticpublic_keypair(Seed,PublicKey)public_keypair(-list(byte),-list(byte)) - onelocal_encrypt/3
Encrypts Payload using a 32-byte local Key and empty footer and implicit assertion.
staticlocal_encrypt(Key,Payload,Token)local_encrypt(+list(byte),+list(byte),-atom) - one_or_errorKey is a variable or a partial list:instantiation_errorKey is not a list of the required number of bytes:type_error(list(byte,32),Key)Key contains a non-integer byte:type_error(integer,Byte)Key contains an integer outside the byte range:domain_error(byte,Byte)Payload is a variable or a partial list:instantiation_errorPayload is not a list of the required number of bytes:type_error(list(byte,32),Payload)Payload contains a non-integer byte:type_error(integer,Byte)Payload contains an integer outside the byte range:domain_error(byte,Byte)local_encrypt/5
Encrypts Payload using a 32-byte local Key and authenticates Footer and ImplicitAssertion.
staticlocal_encrypt(Key,Payload,Footer,ImplicitAssertion,Token)local_encrypt(+list(byte),+list(byte),+list(byte),+list(byte),-atom) - one_or_errorKey is a variable or a partial list:instantiation_errorKey is not a list of the required number of bytes:type_error(list(byte,32),Key)Key contains a non-integer byte:type_error(integer,Byte)Key contains an integer outside the byte range:domain_error(byte,Byte)Payload is a variable or a partial list:instantiation_errorPayload is not a list of the required number of bytes:type_error(list(byte,32),Payload)Payload contains a non-integer byte:type_error(integer,Byte)Payload contains an integer outside the byte range:domain_error(byte,Byte)Footer is a variable or a partial list:instantiation_errorFooter is not a list of the required number of bytes:type_error(list(byte,32),Footer)Footer contains a non-integer byte:type_error(integer,Byte)Footer contains an integer outside the byte range:domain_error(byte,Byte)ImplicitAssertion is a variable or a partial list:instantiation_errorImplicitAssertion is not a list of the required number of bytes:type_error(list(byte,32),ImplicitAssertion)ImplicitAssertion contains a non-integer byte:type_error(integer,Byte)ImplicitAssertion contains an integer outside the byte range:domain_error(byte,Byte)local_decrypt/3
Authenticates and decrypts a local Token using an empty implicit assertion.
staticlocal_decrypt(Token,Key,Payload)local_decrypt(+atom,+list(byte),-list(byte)) - zero_or_one_or_errorToken is a variable:instantiation_errorToken is neither a variable nor an atom:type_error(atom,Token)Token is an atom but not a canonical v4.local token:domain_error(paseto_v4_token,Token)Key is a variable or a partial list:instantiation_errorKey is not a list of the required number of bytes:type_error(list(byte,32),Key)Key contains a non-integer byte:type_error(integer,Byte)Key contains an integer outside the byte range:domain_error(byte,Byte)local_decrypt/5
Authenticates and decrypts a local Token using ImplicitAssertion and returns its authenticated Footer.
staticlocal_decrypt(Token,Key,ImplicitAssertion,Payload,Footer)local_decrypt(+atom,+list(byte),+list(byte),-list(byte),-list(byte)) - zero_or_one_or_errorToken is a variable:instantiation_errorToken is neither a variable nor an atom:type_error(atom,Token)Token is an atom but not a canonical v4.local token:domain_error(paseto_v4_token,Token)Token is a v4.local token but has a malformed compact serialization:domain_error(paseto_compact_serialization,malformed)Token contains non-canonical base64url data:representation_error(base64)Token has a malformed local payload:domain_error(paseto_v4_local_payload,Token)Key is a variable or a partial list:instantiation_errorKey is not a list of the required number of bytes:type_error(list(byte,32),Key)Key contains a non-integer byte:type_error(integer,Byte)Key contains an integer outside the byte range:domain_error(byte,Byte)ImplicitAssertion is a variable or a partial list:instantiation_errorImplicitAssertion is not a list of the required number of bytes:type_error(list(byte,32),ImplicitAssertion)ImplicitAssertion contains a non-integer byte:type_error(integer,Byte)ImplicitAssertion contains an integer outside the byte range:domain_error(byte,Byte)public_sign/3
Signs Payload using an Ed25519 Seed and empty footer and implicit assertion.
staticpublic_sign(Seed,Payload,Token)public_sign(+list(byte),+list(byte),-atom) - one_or_errorSeed is a variable or a partial list:instantiation_errorSeed is not a list of the required number of bytes:type_error(list(byte,32),Seed)Seed contains a non-integer byte:type_error(integer,Byte)Seed contains an integer outside the byte range:domain_error(byte,Byte)Payload is a variable or a partial list:instantiation_errorPayload is not a list of the required number of bytes:type_error(list(byte,32),Payload)Payload contains a non-integer byte:type_error(integer,Byte)Payload contains an integer outside the byte range:domain_error(byte,Byte)public_sign/5
Signs Payload using an Ed25519 Seed and authenticates Footer and ImplicitAssertion.
staticpublic_sign(Seed,Payload,Footer,ImplicitAssertion,Token)public_sign(+list(byte),+list(byte),+list(byte),+list(byte),-atom) - one_or_errorSeed is a variable or a partial list:instantiation_errorSeed is not a list of the required number of bytes:type_error(list(byte,32),Seed)Seed contains a non-integer byte:type_error(integer,Byte)Seed contains an integer outside the byte range:domain_error(byte,Byte)Payload is a variable or a partial list:instantiation_errorPayload is not a list of the required number of bytes:type_error(list(byte,32),Payload)Payload contains a non-integer byte:type_error(integer,Byte)Payload contains an integer outside the byte range:domain_error(byte,Byte)Footer is a variable or a partial list:instantiation_errorFooter is not a list of the required number of bytes:type_error(list(byte,32),Footer)Footer contains a non-integer byte:type_error(integer,Byte)Footer contains an integer outside the byte range:domain_error(byte,Byte)ImplicitAssertion is a variable or a partial list:instantiation_errorImplicitAssertion is not a list of the required number of bytes:type_error(list(byte,32),ImplicitAssertion)ImplicitAssertion contains a non-integer byte:type_error(integer,Byte)ImplicitAssertion contains an integer outside the byte range:domain_error(byte,Byte)public_verify/3
Authenticates a public Token using an Ed25519 public key and empty implicit assertion.
staticpublic_verify(Token,PublicKey,Payload)public_verify(+atom,+list(byte),-list(byte)) - zero_or_one_or_errorToken is a variable:instantiation_errorToken is neither a variable nor an atom:type_error(atom,Token)Token is an atom but not a canonical v4.public token:domain_error(paseto_v4_token,Token)PublicKey is a variable or a partial list:instantiation_errorPublicKey is not a list of the required number of bytes:type_error(list(byte,32),PublicKey)PublicKey contains a non-integer byte:type_error(integer,Byte)PublicKey contains an integer outside the byte range:domain_error(byte,Byte)public_verify/5
Authenticates a public Token using an Ed25519 public key and ImplicitAssertion and returns its authenticated Footer.
staticpublic_verify(Token,PublicKey,ImplicitAssertion,Payload,Footer)public_verify(+atom,+list(byte),+list(byte),-list(byte),-list(byte)) - zero_or_one_or_errorToken is a variable:instantiation_errorToken is neither a variable nor an atom:type_error(atom,Token)Token is an atom but not a canonical v4 token:domain_error(paseto_v4_token,Token)Token is a canonical v4 token but has a malformed compact serialization:domain_error(paseto_compact_serialization,malformed)Token contains non-canonical base64url data:representation_error(base64)Token has a malformed public payload:domain_error(paseto_v4_public_payload,Token)PublicKey is a variable or a partial list:instantiation_errorPublicKey is not a list of the required number of bytes:type_error(list(byte,32),PublicKey)PublicKey contains a non-integer byte:type_error(integer,Byte)PublicKey contains an integer outside the byte range:domain_error(byte,Byte)ImplicitAssertion is a variable or a partial list:instantiation_errorImplicitAssertion is not a list of the required number of bytes:type_error(list(byte,32),ImplicitAssertion)ImplicitAssertion contains a non-integer byte:type_error(integer,Byte)ImplicitAssertion contains an integer outside the byte range:domain_error(byte,Byte)Protected predicates
(none)
Private predicates
(none)
Operators
(none)