mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
Former-commit-id: a3ad38695e8c1e1040a6a3f4b8470217e8a98489 Former-commit-id: cd3809edcae7b26e7b3d846dab17f1f63761f30f
20 lines
978 B
TeX
20 lines
978 B
TeX
The Serurity API provides functions for security purposes, such as hashing and CSPRNG\footnote{Cryptographically secure psuedo-random number generator}.
|
|
|
|
\section{Functions}
|
|
|
|
\begin{tabularx}{\textwidth}{l l X}
|
|
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
|
|
\\ \\
|
|
\endhead
|
|
security.toSHA1(string) & string & Returns SHA-256 hash of input string in array of bytes (as a string)
|
|
\\ \\
|
|
security.toSHA256(string) & string & Returns SHA-1 hash of input string in array of bytes
|
|
\\ \\
|
|
security.toMD5(string) & string & Returns MD-5 hash of input string in array of bytes
|
|
\\ \\
|
|
security.randomBytes(\textbf{len}: int) & string & Returns byte array of random values in desired \textbf{len}gth.
|
|
\\ \\
|
|
security.decodeBase64(string) & string & Decodes Base64 string and returns the result as string.
|
|
\\ \\
|
|
security.encodeBase64(string) & string & Encodes input string as Base64 format and returns the result as array of bytes.
|
|
\end{tabularx} |