Home Reference Source Repository
import Crypto from 'tsugi-node/src/util/Crypto.js'
public class | source

Crypto

This is a simple set of static function encryption routines.

Static Method Summary

Static Public Methods
public static

This does a simple AES descryption to avoid spilling secrets in logs.

public static

This does a simple AES encryption to avoid spilling secrets in logs.

public static

sha256(v: *): *: string

Simple sha256 computtion

Static Public Methods

public static decryptShortTerm(v: *): *: string source

This does a simple AES descryption to avoid spilling secrets in logs. The key is effectively random for a node execution so don't use this to store data in a database.

Params:

NameTypeAttributeDescription
v *

Return:

*

public static encryptShortTerm(v: *): *: string source

This does a simple AES encryption to avoid spilling secrets in logs. The key is effectively random for a node execution so don't use this to store data in a database.

Params:

NameTypeAttributeDescription
v *

Return:

*

public static sha256(v: *): *: string source

Simple sha256 computtion

Params:

NameTypeAttributeDescription
v *

Return:

*