MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / public_key_from_bytes

Function public_key_from_bytes

sodiumbox/src/lib.rs:173–175  ·  view source on GitHub ↗

Convenience function to convert a public key from bytes to the PublicKey type

(bytes: &[u8; 32])

Source from the content-addressed store, hash-verified

171
172/// Convenience function to convert a public key from bytes to the PublicKey type
173pub fn public_key_from_bytes(bytes: &[u8; 32]) -> PublicKey {
174 PublicKey::from(*bytes)
175}
176
177/// Convenience function to convert a secret key from bytes to the StaticSecret type
178pub fn secret_key_from_bytes(bytes: &[u8; 32]) -> StaticSecret {

Calls

no outgoing calls