Crypto
Generates UUIDs, hashes, and signatures
type CryptoDecodeFunction = (content: string) => Promise<DataOrError<string>>
type CryptoEncodeFunction = (content: string) => Promise<DataOrError<string>>
type CryptoHashFunction = (content?: string) => Promise<DataOrError<string>>
interface CryptoPlugin
extends Plugable {
decode: CryptoDecodeFunction
encode: CryptoEncodeFunction
hash: CryptoHashFunction
install: function
sign: CryptoSignFunction
uuid: CryptoUuidFunction
}
type CryptoSignFunction = (request: CryptoSignRequest) => Promise<DataOrError<string>>
interface CryptoSignRequest {
content: string
key: string
}
type CryptoUuidFunction = () => Uuid
/** @implements CryptoPlugin */
class ClientCryptoPlugin {
decode: CryptoDecodeFunction
encode: CryptoEncodeFunction
hash: CryptoHashFunction
install: function
sign: CryptoSignFunction
uuid: CryptoUuidFunction
}
/** @implements CryptoPlugin */
class CryptoPluginClass
extends PluginClass {
decode: CryptoDecodeFunction
encode: CryptoEncodeFunction
hash: CryptoHashFunction
install: function
sign: CryptoSignFunction
uuid: CryptoUuidFunction
}