Versions in this module Expand all Collapse all v0 v0.1.0 Jan 22, 2025 Changes in this version + const Decrypt + const DeriveBits + const DeriveKey + const Encrypt + const ErrDataError + const ErrInvalidAccessError + const ErrNotSupportedError + const ErrOperationError + const ErrQuotaExceededError + const ErrSyntaxError + const Private + const Public + const Secret + const Sign + const UnwrapKey + const Verify + const WrapKey + func GetRandomValues(b []byte) error + func RandomUUID() string + func RegisterAlgorithm(name string, subtle SubtleCrypto) + type Algorithm struct + Name string + Params any + type CryptoKey interface + Algorithm func() KeyAlgorithm + Extractable func() bool + Type func() KeyType + Usages func() []KeyUsage + type CryptoKeyPair interface + PrivateKey func() CryptoKey + PublicKey func() CryptoKey + func NewCryptoKeyPair(public CryptoKey, private CryptoKey) CryptoKeyPair + type Error interface + Message func() string + Name func() string + func ErrInvalidUsages(allowed ...KeyUsage) Error + func ErrMethodNotSupported() Error + func FromError(err error) (Error, error) + func NewError(name string, message string) Error + type JsonWebKey struct + Alg string + Crv string + D string + Dp string + Dq string + E string + Ext bool + K string + KeyOps []KeyUsage + Kty string + N string + Oth []RsaOtherPrimesInfo + P string + Q string + Qi string + Use string + X string + Y string + type KeyAlgorithm interface + Name func() string + type KeyFormat string + const Jwk + const PKCS8 + const Raw + const SubjectPublicKeyInfo + type KeyType string + type KeyUsage string + type RsaOtherPrimesInfo struct + D string + R string + T string + type SubtleCrypto interface + Decrypt func(algorithm *Algorithm, key CryptoKey, data []byte) ([]byte, error) + DeriveBits func(algorithm *Algorithm, baseKey CryptoKey, length uint64) ([]byte, error) + DeriveKey func(algorithm *Algorithm, baseKey CryptoKey, derivedKeyType *Algorithm, ...) (CryptoKey, error) + Digest func(algorithm *Algorithm, data []byte) ([]byte, error) + Encrypt func(algorithm *Algorithm, key CryptoKey, data []byte) ([]byte, error) + ExportKey func(format KeyFormat, key CryptoKey) (any, error) + GenerateKey func(algorithm *Algorithm, extractable bool, keyUsages []KeyUsage) (any, error) + ImportKey func(format KeyFormat, keyData any, algorithm *Algorithm, extractable bool, ...) (CryptoKey, error) + Sign func(algorithm *Algorithm, key CryptoKey, data []byte) ([]byte, error) + UnwrapKey func(format KeyFormat, wrappedKey []byte, unwrappingKey CryptoKey, ...) (CryptoKey, error) + Verify func(algorithm *Algorithm, key CryptoKey, signature []byte, data []byte) (bool, error) + WrapKey func(format KeyFormat, key CryptoKey, wrappingKey CryptoKey, ...) (any, error) + func Subtle() SubtleCrypto v0.1.0-alpha.1 Apr 14, 2024