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

Function secret_key_from_bytes

sodiumbox/src/lib.rs:178–180  ·  view source on GitHub ↗

Convenience function to convert a secret key from bytes to the StaticSecret type

(bytes: &[u8; 32])

Source from the content-addressed store, hash-verified

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 {
179 StaticSecret::from(*bytes)
180}
181
182#[cfg(test)]
183mod tests {

Calls

no outgoing calls