crypto

Crypto

https://golang.org/pkg/crypto/

SHA256

包含了sha224 與 sha256

package main

import (
    "crypto/sha256"
    "fmt"
)

func main() {
    sum := sha256.Sum256([]byte("hello world\n"))
    fmt.Printf("%x", sum)
}

https://play.golang.org/p/Ky4kmHLqly

SHA3

(包含原生sha3和SHAKE)

The SHAKE instances are faster than the SHA3 instances

https://godoc.org/golang.org/x/crypto/sha3

等同於

RIPEMD160

HMAC

https://golang.org/pkg/crypto/hmac/

ECDSA

AES

RSA

包含 OAEP 與 PKCS

先產生公鑰與私鑰

Last updated

Was this helpful?