Skip to content

Instantly share code, notes, and snippets.

@whyrusleeping
Created September 3, 2014 06:36
Show Gist options
  • Save whyrusleeping/91303dd0b96db420b235 to your computer and use it in GitHub Desktop.
Save whyrusleeping/91303dd0b96db420b235 to your computer and use it in GitHub Desktop.
ipfs key interfaces
package crypto
type PrivKey interface {
Sign([]byte) ([]byte, error)
Decrypt([]byte) ([]byte, error)
GetPublic() PubKey
GenSecret() []byte
}
type PubKey interface {
Verify([]byte, []byte) (bool, error)
Encrypt([]byte) ([]byte, error)
Bytes() []byte
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment