TOTP introduction and simple implementation based on C ා

Intro TOTP is a time-based one-time password generation algorithm, which is composed of RFC 6238 Definition. Different from the event based one-time password generation algorithm HOTP TOTP is time-based and has the following relationship with HOTP: TOTP = HOTP(K, T) HOTP(K,C) = Truncate(HMAC-SHA-1(K,C)) Among them: T: T = (Current Unix time - ...

Posted by Yippee on Sun, 24 Nov 2019 13:04:35 -0800

The problem of "bed allocation" -- the realization of C language array

Written in front It's hard to write ~ but teacher fan didn't even let me run ~ I'm dry!It adopts the storage mode of structure array. Title: bed allocation A hotel has N rooms, K rooms have a (k), and each room has B (k) single beds. The program of allocating beds for single passengers and withdrawing beds when leaving the hotel is designed by ...

Posted by czs on Thu, 21 Nov 2019 06:10:41 -0800

(Centos7) Supervisor installation and deployment

1.yum installation yum install epel-release yum install -y supervisor 2. Configuration fileAfter the supervisor is installed successfully, no default configuration file is provided. You can generate the initialization configuration file of the supervisor by running the echo supervisor conf program mkdir /etc/supervisor echo_supervisord_conf &g ...

Posted by Valdhor on Tue, 19 Nov 2019 12:13:26 -0800

Swoole learning notes: getting started with Hprose

1. What is RPCRPC is a way of communication between processes, the full name is "remote call procedure".When a client sends a request to the server, it is not sent directly to the target server, but to the RPC Server, which schedules it.RPC provides remote calling methods that are no different from calling local methods. 2. Introduct ...

Posted by Eddie Fisher on Sun, 17 Nov 2019 13:45:17 -0800

String data type of Python full stack path series

String (str) String type is the sequence type of python. Its essence is character sequence. Besides, the string type of python can't be changed. You can't modify the original string, but you can copy part of the string into a new string to achieve the same modification effect. To create a string type, you can use single quotation mark, double q ...

Posted by chaoswuz on Sat, 16 Nov 2019 04:54:29 -0800

Upgrade ideas of in place for MySQL 5.7.25

I. description It is found that MySQL has a low-risk vulnerability. You can write your own scheme, test yourself, and upgrade yourself. Version: upgrade MySQL 5.7.25 to the latest version of MySQL 5.7.28. Architecture: master-slave architecture II. Upgrading process 1. Download the latest database software MySQL 5.7.28 2. Upload to the spec ...

Posted by adityakonda on Thu, 14 Nov 2019 06:02:08 -0800

Deep analysis of source code for building native network model with go netpol I / O multiplexing

introduction Go builds a simple and high-performance native network model (I/O multiplexing netpoll based on go) based on I/O multiplexing and goroutine, which provides a simple network programming mode such as goroutine per connection. In this mode, developers use the synchronous mode to write asynchronous logic, which greatly reduces the ment ...

Posted by robertvideo on Sat, 09 Nov 2019 07:14:14 -0800

Go in API routing middleware signature verification

overviewFirst, synchronize the following project overview:The last article shared the routing Middleware - Jaeger link tracking (actual combat). The response is really unexpected. The "Go China" public number has also been forwarded. Many friends have exchanged with my friends, calling me a big God. Actually, I am a big God, but I hav ...

Posted by bigwatercar on Sat, 09 Nov 2019 05:41:11 -0800

Dependency Injection Using google/wire

Wire Use Tutorial Wire is a tool provided by Google to help Google developers implement compile-time dependency injection.Learn to use Wire through examples.Here's a small welcome program to learn how to use Wire. The first step in building a welcome program Let's create a applet that simulates an event with a greeting for a welcome guest with ...

Posted by dylan001 on Sat, 09 Nov 2019 01:10:34 -0800

A series of transformations and common methods of Date object

I found that we often encounter a series of operations about time in projects, such as calculating the days of difference between two dates, etc., so I plan to make a good arrangement for later projects to use.Date object: used to process date and timeI. create Date object var date1=new Date();//Parameter none, default current time var date2=ne ...

Posted by Mr.x on Fri, 08 Nov 2019 03:09:35 -0800