使用Rails凭据加密来加密文件
我正在尝试在代码中使用Rails凭据加密。
我想通过将文件和加密密钥传递给文件来加密文件 方法。 我希望结果是可用的加密凭据文件。
不确定我是否可以按照我想要的Ruby代码中使用凭据加密,也不知道从哪里开始。
I'm trying to use Rails credentials encryption in the code.
I want to encrypt the file by passing the file with credentials and encryption key to the
method.
I want the result to be a usable encrypted credentials file.
Not sure if i can use credentials encryption in Ruby code as i would like to and i don't know where to start.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
给定
_path_/file_to_be_encrypted.txt
作为加密文件:要读取加密文件:
Given
_PATH_/file_to_be_encrypted.txt
as the file to encrypt:To read encrypted file: