@bicycle-codes/crypto-util

Namespaces

aes
ecc
rsa

Enumerations

CharSize
EccCurve
HashAlg
KeyUse
RsaSize
SymmKeyLength

Interfaces

LockKey

Type Aliases

CipherText
DID
JSONPrimitive
JSONValue
KeyAlgorithm
KeyTypes
Msg
PrivateKey
PublicKey
SymmAlg
SymmKey
SymmKeyOpts

Variables

AES_GCM
BASE58_DID_PREFIX
BLS_DID_PREFIX
DEFAULT_CHAR_SIZE
DEFAULT_CTR_LEN
DEFAULT_ECC_CURVE
DEFAULT_ENCRYPTION_KEY_NAME
DEFAULT_ENTROPY_SIZE
DEFAULT_HASH_ALGORITHM
DEFAULT_RSA_SIZE
DEFAULT_SIGNING_KEY_NAME
DEFAULT_STRING_ENCODING
DEFAULT_SYMM_ALGORITHM
DEFAULT_SYMM_LEN
ECC_ENCRYPT_ALGORITHM
ECC_SIGN_ALGORITHM
EDWARDS_DID_PREFIX
InvalidMaxValue
KEY_TYPE
magicBytes
publicKeyToDid
RSA_ALGORITHM
RSA_DID_PREFIX
RSA_HASHING_ALGORITHM
RSA_SALT_LENGTH
RSA_SIGN_ALGORITHM

Functions

arrayBuffersEqual
arrBufToBase64
arrBufToStr
asBufferOrString
base64ToArrBuf
buffersEqual
checkValidKeyUse
didToPublicKey
exportKey
fromString
generateEntropy
hasProp
isByteArray
isCryptoKey
isCryptoKeyPair
joinBufs
normalizeBase64ToBuf
normalizeToBuf
normalizeUnicodeToBuf
normalizeUtf16ToBuf
normalizeUtf8ToBuf
parseMagicBytes
publicExponent
randomBuf
sha256
stringify
strToArrBuf
toString