mirror of
https://github.com/status-im/status-lib.git
synced 2025-01-19 00:42:59 +00:00
2be8bb55ee
- methods `changeDatabasePassword` and `getLinkPreviewWhitelist` added to `privacy.nim` - `hashPassword` moved to `utils.nim` since it's used from multiple paces - `getEthAccounts` added to `eth.nim` - `verifyAccountPassword` method updated so it returns `RpcResponse` now
12 lines
350 B
Nim
12 lines
350 B
Nim
import nimcrypto
|
|
|
|
proc isWakuEnabled(): bool =
|
|
true # TODO:
|
|
|
|
proc prefix*(methodName: string, isExt:bool = true): string =
|
|
result = if isWakuEnabled(): "waku" else: "shh"
|
|
result = result & (if isExt: "ext_" else: "_")
|
|
result = result & methodName
|
|
|
|
proc hashPassword*(password: string): string =
|
|
result = "0x" & $keccak_256.digest(password) |