Skip to main content

Module crypto

Module crypto 

Source
Expand description

What the wire needs of cryptography: SHA-1 for the WebSocket handshake, base64 and HS256 JSON Web Tokens with the claims Hasura reads.

Constants§

CLAIMS
The namespace of Hasura’s claims inside a token.

Functions§

base64
base64url
base64url_decode
sha1
sign_token
A token saying its bearer is subject, the way deeplinks signs them.
verify_token
The subject of a token this secret signed; an expired, forged or malformed token is an error.
websocket_accept
Sec-WebSocket-Accept of a Sec-WebSocket-Key.