Documentation ¶
Index ¶
- Constants
- func AddressFromPrvKey(prvBech string) (addr string, err error)
- func AseDecrypt(ciphertext []byte, key, iv []byte) ([]byte, error)
- func AseEncrypt(plaintext string, bKey []byte, bIV []byte, blockSize int) ([]byte, error)
- func DecodeBech32(prefix, data string) ([]byte, error)
- func Decrypt(prvBech string, pubkey string, ciphertext string) (res string, err error)
- func Encrypt(prvBech string, pubkey string, text string, fakeIv string) (res string, err error)
- func GetEventHash(e *Event) (string, error)
- func GetPublicKey(prvBech string) (pub string, err error)
- func NpubEncode(pubHex string) (res string, err error)
- func NsecEncode(prvHex string) (res string, err error)
- func PKCS5Padding(ciphertext []byte, blockSize int, after int) []byte
- func PKCS5Trimming(encrypt []byte) []byte
- func TryGetPubkey(pubkeyHex string) []byte
- func ValidateAddress(address string) bool
- func VerifyEvent(e *Event) (ok bool)
- type Event
Constants ¶
View Source
const ( // pubkeyCompressed is the header byte for a compressed secp256k1 pubkey. PUBKEY_COMPRESSED byte = 0x2 // y_bit + x coord HRP = "npub" NSec = "nsec" )
Variables ¶
This section is empty.
Functions ¶
func AddressFromPrvKey ¶
func AseEncrypt ¶
func DecodeBech32 ¶
func GetEventHash ¶
func GetPublicKey ¶
func NpubEncode ¶
func NsecEncode ¶
func PKCS5Trimming ¶
func TryGetPubkey ¶
func ValidateAddress ¶
func VerifyEvent ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.