Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
make it a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
apisit committed May 30, 2018
1 parent 33239fc commit 4e64572
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions neoutils/nep2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ package neoutils

import "github.com/o3labs/neo-utils/neoutils/nep2"

func NEP2Encrypt(wif string, passphrase string) (s string, address string, err error) {
return nep2.NEP2Encrypt(wif, passphrase)
type NEP2 struct {
EncryptedKey string
Address string
}

func NEP2Encrypt(wif string, passphrase string) (*NEP2, error) {
encryptedKey, address, err := nep2.NEP2Encrypt(wif, passphrase)
return &NEP2{
EncryptedKey: encryptedKey,
Address: address,
}, err
}

func NEP2Decrypt(key, passphrase string) (s string, err error) {
Expand Down

0 comments on commit 4e64572

Please sign in to comment.