Cryptography
Function | Description | Meta |
---|---|---|
crypto.hmac.equal |
Returns a boolean representing the result of comparing two MACs for equality without leaking timing information. Arguments: Returns:mac1 (string)mac1 to compare mac2 (string)mac2 to compare result (boolean)
| v0.52.0 SDK-dependent |
crypto.hmac.md5 |
Returns a string representing the MD5 HMAC of the input message using the input key. Arguments: Returns:x (string)input string key (string)key to use y (string)MD5-HMAC of | v0.36.0 SDK-dependent |
crypto.hmac.sha1 |
Returns a string representing the SHA1 HMAC of the input message using the input key. Arguments: Returns:x (string)input string key (string)key to use y (string)SHA1-HMAC of | v0.36.0 SDK-dependent |
crypto.hmac.sha256 |
Returns a string representing the SHA256 HMAC of the input message using the input key. Arguments: Returns:x (string)input string key (string)key to use y (string)SHA256-HMAC of | v0.36.0 SDK-dependent |
crypto.hmac.sha512 |
Returns a string representing the SHA512 HMAC of the input message using the input key. Arguments: Returns:x (string)input string key (string)key to use y (string)SHA512-HMAC of | v0.36.0 SDK-dependent |
crypto.md5 |
Returns a string representing the input string hashed with the MD5 function Arguments: Returns:x (string)input string y (string)MD5-hash of | SDK-dependent |
crypto.parse_private_keys |
Returns zero or more private keys from the given encoded string containing DER certificate data. If the input is empty, the function will return null. The input string should be a list of one or more concatenated PEM blocks. The whole input of concatenated PEM blocks can optionally be Base64 encoded. Arguments: Returns:keys (string)PEM encoded data containing one or more private keys as concatenated blocks. Optionally Base64 encoded. output (array[object[string: any]])parsed private keys represented as objects | v0.55.0 SDK-dependent |
crypto.sha1 |
Returns a string representing the input string hashed with the SHA1 function Arguments: Returns:x (string)input string y (string)SHA1-hash of | SDK-dependent |
crypto.sha256 |
Returns a string representing the input string hashed with the SHA256 function Arguments: Returns:x (string)input string y (string)SHA256-hash of | SDK-dependent |
crypto.x509.parse_and_verify_certificates |
Returns one or more certificates from the given string containing PEM or base64 encoded DER certificates after verifying the supplied certificates form a complete certificate chain back to a trusted root. The first certificate is treated as the root and the last is treated as the leaf, with all others being treated as intermediates. Arguments: Returns:certs (string)base64 encoded DER or PEM data containing two or more certificates where the first is a root CA, the last is a leaf certificate, and all others are intermediate CAs output (array<boolean, array[object[string: any]]>)array of | v0.31.0 SDK-dependent |
crypto.x509.parse_and_verify_certificates_with_options |
Returns one or more certificates from the given string containing PEM or base64 encoded DER certificates after verifying the supplied certificates form a complete certificate chain back to a trusted root. A config option passed as the second argument can be used to configure the validation options used. The first certificate is treated as the root and the last is treated as the leaf, with all others being treated as intermediates. Arguments: Returns:certs (string)base64 encoded DER or PEM data containing two or more certificates where the first is a root CA, the last is a leaf certificate, and all others are intermediate CAs options (object[string: any])object containing extra configs to verify the validity of certificates. output (array<boolean, array[object[string: any]]>)array of | v0.63.0 SDK-dependent |
crypto.x509.parse_certificate_request |
Returns a PKCS #10 certificate signing request from the given PEM-encoded PKCS#10 certificate signing request. Arguments: Returns:csr (string)base64 string containing either a PEM encoded or DER CSR or a string containing a PEM CSR output (object[string: any])X.509 CSR represented as an object | v0.21.0 SDK-dependent |
crypto.x509.parse_certificates |
Returns zero or more certificates from the given encoded string containing DER certificate data. If the input is empty, the function will return null. The input string should be a list of one or more concatenated PEM blocks. The whole input of concatenated PEM blocks can optionally be Base64 encoded. Arguments: Returns:certs (string)base64 encoded DER or PEM data containing one or more certificates or a PEM string of one or more certificates output (array[object[string: any]])parsed X.509 certificates represented as objects | SDK-dependent |
crypto.x509.parse_keypair |
Returns a valid key pair Arguments: Returns:cert (string)string containing PEM or base64 encoded DER certificates pem (string)string containing PEM or base64 encoded DER keys output (object[string: any])if key pair is valid, returns the tls.certificate(https://pkg.go.dev/crypto/tls#Certificate) as an object. If the key pair is invalid, nil and an error are returned. | v0.53.0 SDK-dependent |
crypto.x509.parse_rsa_private_key |
Returns a JWK for signing a JWT from the given PEM-encoded RSA private key. Arguments: Returns:pem (string)base64 string containing a PEM encoded RSA private key output (object[string: any])JWK as an object | v0.33.0 SDK-dependent |