From 274204c21e421ed13c66411ce56bb70dea03d410 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 28 Sep 2016 23:41:34 +0200 Subject: check contract hash, fix unicode bug --- lib/wallet/cryptoLib.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/wallet/cryptoLib.ts') 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) -- cgit v1.2.3