捕获和转换Web的工具

如何保护拍摄内容?

加密捕获

在《通用数据保护条例》或《GDPR》等法律时代,保护用户信息变得比以往任何时候都更加重要。 捕获后,它会在我们的服务器上缓存一小段时间,以便能够下载。 虽然我们的服务器是安全的,但未经许可我们不会检查用户的捕获内容。 在处理个人信息的某些场景下,这还不够保护。

第一个潜在的改进是通过将缓存长度更改为零分钟来不再缓存捕获,在您的 帐户页面。 但请注意,这意味着捕获将无法在很长一段时间内下载,因此必须在创建后立即下载。

另一个可能的安全问题是将敏感数据发送给我们的实际过程。 为了保护这些数据,您应该首先 启用S​​SL,然后一旦我们收到数据并对其进行处理(速度很快),它将自动从我们的系统中删除,以确保不存在安全漏洞。

还可以通过以下方式为 PDF 或 DOCX 捕获添加更多安全性: 密码保护文档。 这可确保只有具有正确密码的用户才能访问受保护的文件。

但是,如果您正在捕获非常敏感的信息(例如医院记录等)并需要额外级别的保护,您可以对捕获的结果本身进行加密。 为此,您需要为每个请求指定一个加密密钥,这些密钥不会由 GrabzIt 存储。 该密钥用于加密保护信息的捕获。 由于我们不存储密钥,因此无法帮助您恢复加密的捕获。 收到捕获后,请使用之前生成的密钥对其进行解密。

在下面的示例中,创建了一个加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后使用相同的加密密钥来解密结果。

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
grabzIt.UseSSL(true);

string encryptionKey = grabzIt.CreateEncryptionKey();

ImageOptions options = new ImageOptions();
options.EncryptionKey = encryptionKey;

grabzIt.URLToImage("http://www.spacex.com", options);
GrabzItFile encryptedCapture = grabzIt.SaveTo();

GrabzItFile decryptedCapture = grabzIt.Decrypt(encryptedCapture, encryptionKey);

在下面的示例中,创建了一个加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后使用相同的加密密钥来解密结果。

为了在 Java 6、7 和 8 中使用加密捕获,请安装 Java 加密扩展 (JCE) 无限强度管辖策略文件 into Java 安装文件夹的所有 /jre/lib/security/ 文件夹。

GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
grabzIt.UseSSL(true);

String encryptionKey = grabzIt.CreateEncryptionKey();

ImageOptions options = new ImageOptions();
options.setEncryptionKey(encryptionKey);

grabzIt.URLToImage("http://www.spacex.com", options);
GrabzItFile encryptedCapture = grabzIt.SaveTo();

GrabzItFile decryptedCapture = grabzIt.Decrypt(encryptedCapture, encryptionKey);

在下面的示例中,会自动创建加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后,通过将 true 传递给 DataURI 方法,使用相同的加密密钥自动解密结果,然后可以在回调方法中读取该结果。

<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@3.5.2/grabzit.min.js"></script>
</head>
<body>
<img id="capture"></img>
function callback(dataUri)
{
    document.getElementById('capture').src = dataUri;
}
<script type="text/javascript">
GrabzIt("Sign in to view your Application Key").UseSSL().Encrypt().ConvertURL("http://www.spacex.com").DataURI(callback, true);
</script>
</body>
</html>

在下面的示例中,创建了一个加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后使用相同的加密密钥来解密结果。

var grabzit = require('grabzit');

var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret");
client.use_ssl(true);

var encryptionKey = client.create_encryption_key();

client.url_to_image("http://www.spacex.com", {"encryptionKey":encryptionKey});
client.save_to(null, function (error, result){
    if (error != null){
        throw error;
    }
    var decryptedBytes = client.decrypt(result, encryptionKey);
}); 	

不幸的是,Perl 无法本地解密 AES 加密,需要外部可执行文件或 C 编译。 因此,我们尚未将此功能添加到 Perl API 中,您可以使用下面的指南自行添加此功能。

$grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret");
$grabzIt->UseSSL(1);

$options = GrabzItImageOptions->new();
$options->encryptionKey("UUK2Xo9OLT2dFvN0wPBGOMZRYqD6WxqFtrZK9YrG+Hg=");
$grabzIt->URLToImage("http://www.spacex.com", $options);
//needs to be decrypted
$data = $grabzIt->SaveTo();

在下面的示例中,创建了一个加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后使用相同的加密密钥来解密结果。

$grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret");
$grabzIt->UseSSL(true);

$encryptionKey = $grabzIt->CreateEncryptionKey();

$options = new \GrabzIt\GrabzItImageOptions();
$options->setEncryptionKey($encryptionKey);

$grabzIt->URLToImage("http://www.spacex.com", $options);
$encryptedData = $grabzIt->SaveTo();

$decryptedData = $grabzIt->Decrypt($encryptedData, $encryptionKey);

在下面的示例中,创建了一个加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后使用相同的加密密钥来解密结果。

grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret")
grabzIt.UseSSL(True)

encryptionKey = grabzIt.CreateEncryptionKey()

options = GrabzItImageOptions.GrabzItImageOptions()
options.encryptionKey = encryptionKey

grabzIt.URLToImage("http://www.spacex.com", options)
encryptedData = grabzIt.SaveTo()

decryptedData = grabzIt.Decrypt(encryptedData, encryptionKey)

在下面的示例中,创建了一个加密安全密钥并将其发送到 GrabzIt,然后使用该密钥对捕获进行加密。 然后使用相同的加密密钥来解密结果。

grabzIt = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret")
grabzIt.use_ssl(true)

encryptionKey = grabzIt.create_encryption_key()

options = GrabzIt::ImageOptions.new()
options.encryptionKey = encryptionKey

grabzIt.url_to_image("http://www.spacex.com", options)
encryptedData = grabzIt.save_to()

decryptedData = grabzIt.decrypt(encryptedData, encryptionKey)

GrabzIt 的捕获加密如何工作

本指南技术性很强,旨在帮助开发人员了解我们的加密工作原理。 它对 Perl 开发人员特别有用,因为该语言没有不需要完成或安装 Open SSL 等第三方工具的开源 Perl 包。

加密捕获使用 256 位高级加密标准 (AES) 加密。 它还使用密码块链接 (CBC) 块密码操作模式。

为了让 GrabzIt 加密捕获,需要将 64 个字符长的 Base 44 加密密钥传递给选项对象。 要创建此加密密钥,您应该选择 32 个随机加密安全字节。 然后应将它们编码为 Base 64。由于它们是加密安全字节,因此很难预测,因此更难破解。

当 GrabzIt 收到带有加密密钥的捕获请求时,捕获会被加密,并且初始化向量 (IV) 会插入到文件的开头。 该IV长16字节,解密前需要从文件前面删除。 IV 还必须传递给 AES 算法才能解密。 当捕获被加密时,不会向文件添加填充,因此在解密时需要禁用填充。

请记住,如果您对我们现有的客户端 API 之一或全新的语言进行了改进,您可以通过以下方式与社区分享: github上.