-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b39cfc
commit b792b53
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
type Password* = distinct string | ||
type Password* = distinct string ## A special type for plain-text password string to prevent performing normal string operations with them. They are security critical and should not be accidentally logged or the like. | ||
|
||
converter toPassword*(str: string): Password = str.Password | ||
converter toPassword*(str: string): Password = str.Password ## Converter that implicitly converts any string to a `Password` type. Makes it easier to use procs with strings. | ||
|
||
type Hash* = seq[byte] | ||
type Hash* = seq[byte] ## A convenience type to better express hashes. |