在加密中使用字节数组和十六进制值 [英] Use of byte arrays and hex values in Cryptography

查看:341
本文介绍了在加密中使用字节数组和十六进制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们使用加密技术时,我们总是使用字节数组,而不是String值。但是当我们研究大多数密码算法的技术时,他们使用十六进制值来做任何操作。例如。 AES:MixColumns,SubBytes所有这些技术(我想它使用)使用十六进制值来做这些操作。

您可以解释这些字节数组在这些操作中如何作为十六进制值使用。

When we are using cryptography always we are seeing byte arrays are being used instead of String values. But when we are looking at the techniques of most of the cryptography algorithms they uses hex values to do any operations. Eg. AES: MixColumns, SubBytes all these techniques(I suppose it uses) uses hex values to do those operations.
Can you explain how these byte arrays are used in these operations as hex values.

我有一个开发加密算法的任务,因此任何相关的示例代码都是非常合适的。

I have an assignment to develop a encryption algorithm , therefore any related sample codes would be much appropriate.

推荐答案

二进制的每四位数字是一个十六进制数字,所以,你可以很容易地来回转换(参见: http://en.wikipedia.org/wiki/Hexadecimal#Binary_conversion )。

Every four digits of binary makes a hexadecimal digit, so, you can convert back and forth quite easily (see: http://en.wikipedia.org/wiki/Hexadecimal#Binary_conversion).

我不要认为我完全明白你问的是什么。

I don't think I full understand what you're asking, though.

这篇关于在加密中使用字节数组和十六进制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆