Base64Decode wrapper to base64 decode data.
Base64Encode wrapper to base64 encode data.
No description provided by the author
BoxEncryptToBase64 uses asymmetric encryption keys to encrypt data.
CreateRequest isolates duplicate code in creating http search request.
DecodeSymmetricKey decodes a public key from a Base64URL encoded string containing a 256-bit Curve25519 public key, returning an error if the decode operation fails.
Decrypt uses NaCl secret_box to decrypt a string containing ciphertext along with the associated nonce, both Base64 encoded.
DecryptData decrypts a collection of data of string key and values encrypted using Tozny v1 Record encryption, returning the decrypted data and error (if any).
DecryptDataWithProcessFunction decrypts a map of key value pairs where values are encrypted using Tozny v1 Record encryption after description a provided function is run against each key-value pair.
DecryptEAK decodes and decrypts a raw encrypted access key returning the decrypted symmetric key and error (if any).
DecryptFile decrypts the contents of the file encryptedFileName using the ak and stores the plaintext in decryptedFileName If a file called encryptedFileName exists in this directory, it will be overwritten by this method.
DecryptSignedData decrypts and verifies signed payloads for data that has been encrypted and signed using TFSP1;ED25519;BLAKE2B.
DeriveBrokerKeyNoteName derives a broker otp note name for the given parameters.
DeriveBrokerOTPCredentialNoteName derives a broker otp note name for the given parameters.
DeriveCryptoKey creates an encryption key pair from a seed and a salt.
DeriveIdentityCredentials derives a set of encryption keys, signing keys and a note name for the given parameters using pbkdf2.
DeriveIdentityCredentialsNoteName derives a note name for the given parameters.
DeriveSigningKey creates an encryption key pair from a seed and a salt.
DeriveSymmetricKey create a symmetric encryption key from a seed and a salt.
Encrypt uses an NaCl secret_box to encrypt a byte slice with the given secret key and a random nonce, returning the Base64 encoded ciphertext and nonce.
EncryptAccessKey returns encrypted access key with nonce attached.
EncryptData encrypts a collection of data of string key and values using Tozny v1 Record encryption, returning the encrypted data.
EncryptFile encrypts the contents of the file plainFileName using the ak and stores the ciphertext in encryptedFileName.
EncryptPrivateKey Encrypts a private key using a keypair.
ExtractToznyAuthenticatedClientContext extracts a ToznyAuthenticatedClientContext from a header.
GenerateKeyPair creates a new Curve25519 keypair for cryptographic operations.
GenerateRandomBytes generate a random number of bytes.
GenerateRandomString generate a random base64 encoded string of n bytes.
GenerateSigningKeys generates a `base64.RawURLEncoding` private and public key for signing requests and data on behalf of Tozny clients, returning the signing keys and error (if any).
HashString returns a base64 encoded Blake2b hash of the provided message.
MakeE3DBServiceCall attempts to call an e3db service by executing the provided request and deserializing the response into the provided result holder, returning error (if any).
MakeNonce loads an existing nonce from a byte array.
MakeProxiedSignedCall attempts to call an e3db service using the provided signature to authenticate the request.
MakeProxiedUserCall attempts to call an e3db service using provided user auth token to authenticate request.
MakePublicCall makes an unauthenticated request to an e3db service.
MakeRawServiceCall sends a request, auto decoding the response to the result interface if sent.
MakeSignedServiceCall makes a TSV1 signed request(using the private key from the provided keypair), deserializing the response into the provided result holder, and returning error (if any).
MakeSymmetricKey loads an existing secret key from a byte array.
NewError creates a new RequestError.
PublicSigningKeyFromBytes returns a PublicSigningKey derived from a byte slice.
PublicSigningKeyFromEncodedString returns a PublicSigningKey derived from a base64 encoded string.
RandomNonce generates a random nonce of size NoneSize.
RandomSymmetricKey generates a random symmetric key (secret).
ReturnE3dbServiceCall attempts to call an e3db service by executing the provided request and deserializing the response into the provided result holder, returning error (if any).
ReturnRawServiceCall sends a req, auto decoding the response to the result interface and returning Response.
SecretBoxDecryptFromBase64 uses NaCl secret_box to decrypt a string containing ciphertext along with the associated nonce, both Base64URL encoded.
SecretBoxEncryptToBase64 uses an NaCl secret_box to encrypt a byte slice with the given secret key and a random nonce, returning the Base64URL encoded ciphertext and nonce.
Sign does a detached signature of the requested message using the provided key.
SignField signs a field - a key value string pair - using Tozny Field Signing Version 1 (TFSV1) protocol https://github.com/tozny/internal-docs/blob/master/tozny-platform/notes/tozny-field-signing.md in a way compatible with the JS SDK implementation of TFSV1 returning the signed string and error (if any).
SignRequest signs (using Tozny Signature Version 1) the request with the provided public and private sodium signing keys, returning error (if any).
Verify a signature of message using the provided public key, for messages signed with TFSP1;ED25519;BLAKE2B.
VerifyField verifies TFSP1;ED25519;BLAKE2B fields using the provided public key and salt.