Documentation ¶
Overview ¶
Package crypto the crypto JS implementation
Index ¶
- func Md4(input any) (any, error)
- func Md5(input any) (any, error)
- func RandomBytes(call goja.FunctionCall, vm *goja.Runtime) (ret goja.Value)
- func Ripemd160(input any) (any, error)
- func Sha1(input any) (any, error)
- func Sha256(input any) (any, error)
- func Sha384(input any) (any, error)
- func Sha512(input any) (any, error)
- func Sha512_224(input any) (any, error)
- func Sha512_256(input any) (any, error)
- type Cipher
- type Encoder
- type Hasher
- type Module
- type None
- type PKCS5
- type PKCS7
- type Padding
- type Zero
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
RandomBytes returns random data of the given size.
func Sha512_224 ¶
Sha512_224 returns the SHA512/224 Hash of input in the given encoding.
func Sha512_256 ¶
Sha512_256 returns the SHA512/256 Hash of input in the given encoding.
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
Cipher A Block represents an implementation of block cipher using a given key. It provides the capability to encrypt or decrypt individual blocks.
func CreateCipher ¶
CreateCipher returns a new Cipher
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder the encoded
func (*Encoder) Base64rawurl ¶
Base64rawurl encode to base64rawurl
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher wraps a hash.Hash.
func CreateHMAC ¶
CreateHMAC returns a new HMAC Hash using the given algorithm and key.
func CreateHash ¶
CreateHash returns a Hasher instance that uses the given algorithm.
type PKCS5 ¶
type PKCS5 struct{}
PKCS5 padding the blocks size
type PKCS7 ¶
type PKCS7 struct{}
PKCS7 padding the blocks size