frostfs-sdk-go/crypto/doc.go
Airat Arifullin 6281a25556
All checks were successful
/ DCO (pull_request) Successful in 1m17s
/ Lint (pull_request) Successful in 2m7s
/ Tests (1.19) (pull_request) Successful in 5m56s
/ Tests (1.20) (pull_request) Successful in 6m37s
[#100] types: Make sdk types as protobuf wrappers
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-07-12 19:08:37 +03:00

51 lines
1.1 KiB
Go

/*
Package frostfscrypto collects FrostFS cryptographic primitives.
Signer type unifies entities for signing FrostFS data.
// instantiate Signer
// select data to be signed
var sig Signature
err := sig.Calculate(signer, data)
// ...
// attach signature to the request
SDK natively supports several signature schemes that are implemented
in nested packages.
PublicKey allows to verify signatures.
// get signature to be verified
// compose signed data
isValid := sig.Verify(data)
// ...
Signature can be also used to process FrostFS API V2 protocol messages
(see neo.fs.v2.refs package in https://git.frostfs.info/TrueCloudLab/frostfs-api).
On client side:
import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
var msg refs.Signature
sig.WriteToV2(&msg)
// send msg
On server side:
// recv msg
sig := frostfscrypto.NewSignature()
sig.ReadFromV2(msg)
// process sig
Using package types in an application is recommended to potentially work with
different protocol versions with which these types are compatible.
*/
package frostfscrypto