secret
An individual secret.
resource secret;F plaintext
plaintext: func(max-len: u64) -> result<list<u8>, error>;Returns the plaintext value of this secret.
F from-bytes
Creates a new “secret” from the given memory.
This is not the suggested way to create secrets; instead, we suggest using get.
This secret will NOT be shared with other sandboxes.
This method can be used for data that should be secret, but is being obtained by
some other means than the secret store. New “secrets” created this way use plaintext
only, and live in the sandbox's memory unencrypted for much longer than secrets
generated by get. They should thus only be used in situations in which an API requires
a secret, but you cannot (for whatever reason) use a store to store them.
As the early note says, this secret will be local to the current sandbox, and
will not be shared with other instances of this service.