diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-09-28 23:41:34 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-09-28 23:41:34 +0200 |
commit | 274204c21e421ed13c66411ce56bb70dea03d410 (patch) | |
tree | 44f96996f5631526e96866fe583de2ca87ec2898 /lib/wallet/cryptoLib.ts | |
parent | 29909a27f592ac1bca98bfe7058b576167445518 (diff) | |
download | wallet-core-274204c21e421ed13c66411ce56bb70dea03d410.tar.xz |
check contract hash, fix unicode bug
Diffstat (limited to 'lib/wallet/cryptoLib.ts')
-rw-r--r-- | lib/wallet/cryptoLib.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/wallet/cryptoLib.ts b/lib/wallet/cryptoLib.ts index 58a3d5004..9a77b3d74 100644 --- a/lib/wallet/cryptoLib.ts +++ b/lib/wallet/cryptoLib.ts @@ -139,6 +139,11 @@ namespace RpcFunctions { } + export function hashString(str: string): string { + const b = native.ByteArray.fromString(str); + return b.hash().toCrock(); + } + export function hashRsaPub(rsaPub: string): string { return native.RsaPublicKey.fromCrock(rsaPub) |