<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Todo on Ben&#39;s Blog</title>
    <link>https://jinpeng.cv/en/series/todo/</link>
    <description>Recent content in Todo on Ben&#39;s Blog</description>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <copyright>©️ 2025 Ben</copyright>
    <lastBuildDate>Mon, 09 Mar 2026 22:26:59 -0600</lastBuildDate>
    <atom:link href="https://jinpeng.cv/en/series/todo/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>2026-01-01</title>
      <link>https://jinpeng.cv/en/diary/2026/january/2026-01-01/</link>
      <pubDate>Thu, 01 Jan 2026 23:59:21 -0700</pubDate>
      <guid>https://jinpeng.cv/en/diary/2026/january/2026-01-01/</guid>
      <description>&lt;p&gt;Slept in and watched TV (Ted Lasso) all day again!&lt;/p&gt;
&lt;div class=&#34;encrypted-content&#34; data-cipher=&#34;29udHVsYXRpb25zISBZb3Uga25vdyB0b2RheSZyc3F1bztzIGtleSE8L3A&amp;#43;CjxwPk5vdGhpbmcgc3BlY2lhbCBvciBpbXBvcnRhbnQgaGVyZS48L3A&amp;#43;CjxwPkkgd2FudCB0byBnaXZlIHRoZSBwZW9wbGUgd2hvIGtub3cgbWUgYSBsaXR0bGUgaGVscCwgZXNwZWNpYWxseSByZWdhcmRpbmcgdGhlIGludGVybmV0LjwvcD4KPHA&amp;#43;VG8gdGVhY2ggcGVvcGxlIGhvdyB0byBpbXByb3ZlIG91ciBsaWZlIGJ5IGludGVybmV0LiBUaHJvdWdoIHRoZSBjb25mbGljdCBiZXR3ZWVuIEh1YW4gYW5kIG1lLCBJIHJlYWxpemVkIHRoYXQgc29tZW9uZSBuZWVkcyB0byBsZWFybiBob3cgdG8gYnJlYWsgdGhlIGluZm9ybWF0aW9uIGJhcnJpZXJzLjwvcD4KPHA&amp;#43;QZ3Jh&#34; data-hint=&#34;Content Here is Encrypted&#34; data-error=&#34;Password Error&#34;&gt;
  &lt;div class=&#34;locked-state&#34;&gt;
    &lt;p&gt;🔒 Content Here is Encrypted&lt;/p&gt;
    &lt;div class=&#34;password-prompt&#34;&gt;
      &lt;div class=&#34;password-input-wrapper&#34;&gt;
        &lt;input type=&#34;password&#34; class=&#34;password-input&#34;
               placeholder=&#34;Please input password&#34;
               id=&#34;pwd-input-0&#34;
               aria-label=&#34;加密内容密码&#34;&gt;
        &lt;button type=&#34;button&#34;
                class=&#34;toggle-visibility-btn&#34;
                aria-pressed=&#34;false&#34;
                aria-label=&#34;显示或隐藏密码&#34;
                onclick=&#34;toggleVisibility(this, &#39;pwd-input-0&#39;)&#34;&gt;
          &lt;svg class=&#34;icon icon-eye-open&#34; viewBox=&#34;0 0 24 24&#34; aria-hidden=&#34;true&#34;&gt;
            &lt;path d=&#34;M12 5C6 5 2 12 2 12s4 7 10 7 10-7 10-7-4-7-10-7Zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-6a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z&#34;/&gt;
          &lt;/svg&gt;
          &lt;svg class=&#34;icon icon-eye-closed&#34; viewBox=&#34;0 0 24 24&#34; aria-hidden=&#34;true&#34;&gt;
            &lt;path d=&#34;M3.5 4.5 2 6l3.2 3.2A13 13 0 0 0 2 12s4 7 10 7a9.7 9.7 0 0 0 4.7-1.2L18 19l2.5 2.5 1.5-1.5-18-18Zm8.5 12c-5.1 0-8-4-8-4a11 11 0 0 1 2.6-2.9l1.6 1.6a4 4 0 0 0 5.2 5.2l1.6 1.6A7.7 7.7 0 0 1 12 16.5Zm8-4.5a12.5 12.5 0 0 0-4.2-3.6l1.6-1.6A13.6 13.6 0 0 1 22 12s-1.1 2-3 4.1l-1.4-1.4A11.2 11.2 0 0 0 20 12Z&#34;/&gt;
          &lt;/svg&gt;
        &lt;/button&gt;
      &lt;/div&gt;
      &lt;button class=&#34;decrypt-btn&#34; onclick=&#34;decryptContent(event, &#39;pwd-input-0&#39;)&#34;&gt;
        Unlock
      &lt;/button&gt;
    &lt;/div&gt;
    &lt;div class=&#34;status-message&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&#34;decrypted-content markdown-body&#34; hidden&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;style&gt;
.encrypted-content {
  border: 1px solid #878787;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
}

.encrypted-content.unlocked {
  border: none;
  padding: 0;
  margin: 0;
   
  background-image: radial-gradient(rgba(50, 0, 0, 0.1) 1px, transparent 0) !important;
  background-size: 10px 10px;
   
}

.password-prompt {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}

.password-input-wrapper {
  position: relative;
  flex: 3;
}

.password-input {
  width: 100%;
  min-width: 150px;
  padding: 0.75rem;
  padding-right: 2.5rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
}

.password-input.error {
  border-color: #dc3545;
}

.toggle-visibility-btn {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0;
  padding: 0;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-visibility-btn .icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.toggle-visibility-btn .icon-eye-closed {
  display: none;
}

.toggle-visibility-btn.is-visible .icon-eye-open {
  display: none;
}

.toggle-visibility-btn.is-visible .icon-eye-closed {
  display: block;
}

.decrypt-btn {
   
  background-color: var(--primary, #1e90ff);
  color: var(--theme, #fff);
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: opacity 0.3s;
  font-weight: 500;
  flex: 1;
}

.decrypt-btn:hover {
  opacity: 0.9;
}


.status-message {
  color: #6c757d;
  font-size: 0.9em;
  min-height: 1.2em;
}

.status-message.error {
  color: #dc3545;
}
&lt;/style&gt;

&lt;script&gt;
  function toggleVisibility(btn, inputId) {
    const input = document.getElementById(inputId);
    const isPwd = input.type === &#39;password&#39;;
    input.type = isPwd ? &#39;text&#39; : &#39;password&#39;;
    btn.setAttribute(&#39;aria-pressed&#39;, String(isPwd));
    btn.classList.toggle(&#39;is-visible&#39;, isPwd);
  }

  function decryptContent(event, inputId) {
    event.preventDefault();
    const input = document.getElementById(inputId);
    const container = input.closest(&#39;.encrypted-content&#39;);
    const statusEl = container.querySelector(&#39;.status-message&#39;);
    const decryptedContent = container.querySelector(&#39;.decrypted-content&#39;);
  
    statusEl.textContent = &#39;&#39;;
    statusEl.classList.remove(&#39;error&#39;);
    input.classList.remove(&#39;error&#39;);
  
    
    const today = new Date();
    const mmdd = String(today.getUTCMonth() + 1).padStart(2, &#39;0&#39;) + String(today.getUTCDate()).padStart(2, &#39;0&#39;);
    const diff = 1005 - (parseInt(mmdd, 10) || 0);
    const validPwd = String(Math.abs(diff)).padStart(4, &#39;0&#39;);
  
    if (input.value !== validPwd) {
      input.classList.add(&#39;error&#39;);
      statusEl.textContent = container.dataset.error || &#39;&#39;;
      statusEl.classList.add(&#39;error&#39;);
      input.focus();
      return;
    }
  
    try {
      let cipherText = container.dataset.cipher.replace(/\s+/g, &#39;&#39;);
  
      
      
      
      
      
      
      
      
      
      if (cipherText.length &gt; 12) {
        const part1 = cipherText.slice(0, 3);               
        const part2 = cipherText.slice(3, -9);              
        const part3 = cipherText.slice(-9, -4);             
        const part4 = cipherText.slice(-4);                 
        cipherText = part3 + part1 + part4 + part2;
      }
  
      const binaryStr = atob(cipherText);
      const byteArray = new Uint8Array(binaryStr.length);
      for (let i = 0; i &lt; binaryStr.length; i++) {
        byteArray[i] = binaryStr.charCodeAt(i);
      }
  
      const decoded = new TextDecoder(&#34;utf-8&#34;).decode(byteArray);
      const fragment = document.createRange().createContextualFragment(decoded);
  
      decryptedContent.innerHTML = &#39;&#39;;
      decryptedContent.appendChild(fragment);
  
      container.querySelector(&#39;.locked-state&#39;).hidden = true;
      decryptedContent.hidden = false;
      container.classList.add(&#39;unlocked&#39;);
  
    } catch (e) {
      console.error(e);
      statusEl.textContent = &#39;Decode Failed: &#39; + e.message;
      statusEl.classList.add(&#39;error&#39;);
    }
  }
  
  document.addEventListener(&#39;DOMContentLoaded&#39;, () =&gt; {
    document.querySelectorAll(&#39;.password-input&#39;).forEach(input =&gt; {
      input.addEventListener(&#39;keypress&#39;, e =&gt; {
        if (e.key === &#39;Enter&#39;) {
          decryptContent(e, input.id);
        }
      });
    });
  });
  
&lt;/script&gt;</description>
      <content:encoded><![CDATA[<p>Slept in and watched TV (Ted Lasso) all day again!</p>
<div class="encrypted-content" data-cipher="29udHVsYXRpb25zISBZb3Uga25vdyB0b2RheSZyc3F1bztzIGtleSE8L3A&#43;CjxwPk5vdGhpbmcgc3BlY2lhbCBvciBpbXBvcnRhbnQgaGVyZS48L3A&#43;CjxwPkkgd2FudCB0byBnaXZlIHRoZSBwZW9wbGUgd2hvIGtub3cgbWUgYSBsaXR0bGUgaGVscCwgZXNwZWNpYWxseSByZWdhcmRpbmcgdGhlIGludGVybmV0LjwvcD4KPHA&#43;VG8gdGVhY2ggcGVvcGxlIGhvdyB0byBpbXByb3ZlIG91ciBsaWZlIGJ5IGludGVybmV0LiBUaHJvdWdoIHRoZSBjb25mbGljdCBiZXR3ZWVuIEh1YW4gYW5kIG1lLCBJIHJlYWxpemVkIHRoYXQgc29tZW9uZSBuZWVkcyB0byBsZWFybiBob3cgdG8gYnJlYWsgdGhlIGluZm9ybWF0aW9uIGJhcnJpZXJzLjwvcD4KPHA&#43;QZ3Jh" data-hint="Content Here is Encrypted" data-error="Password Error">
  <div class="locked-state">
    <p>🔒 Content Here is Encrypted</p>
    <div class="password-prompt">
      <div class="password-input-wrapper">
        <input type="password" class="password-input"
               placeholder="Please input password"
               id="pwd-input-0"
               aria-label="加密内容密码">
        <button type="button"
                class="toggle-visibility-btn"
                aria-pressed="false"
                aria-label="显示或隐藏密码"
                onclick="toggleVisibility(this, 'pwd-input-0')">
          <svg class="icon icon-eye-open" viewBox="0 0 24 24" aria-hidden="true">
            <path d="M12 5C6 5 2 12 2 12s4 7 10 7 10-7 10-7-4-7-10-7Zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-6a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"/>
          </svg>
          <svg class="icon icon-eye-closed" viewBox="0 0 24 24" aria-hidden="true">
            <path d="M3.5 4.5 2 6l3.2 3.2A13 13 0 0 0 2 12s4 7 10 7a9.7 9.7 0 0 0 4.7-1.2L18 19l2.5 2.5 1.5-1.5-18-18Zm8.5 12c-5.1 0-8-4-8-4a11 11 0 0 1 2.6-2.9l1.6 1.6a4 4 0 0 0 5.2 5.2l1.6 1.6A7.7 7.7 0 0 1 12 16.5Zm8-4.5a12.5 12.5 0 0 0-4.2-3.6l1.6-1.6A13.6 13.6 0 0 1 22 12s-1.1 2-3 4.1l-1.4-1.4A11.2 11.2 0 0 0 20 12Z"/>
          </svg>
        </button>
      </div>
      <button class="decrypt-btn" onclick="decryptContent(event, 'pwd-input-0')">
        Unlock
      </button>
    </div>
    <div class="status-message"></div>
  </div>
  <div class="decrypted-content markdown-body" hidden></div>
</div>



<style>
.encrypted-content {
  border: 1px solid #878787;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
}

.encrypted-content.unlocked {
  border: none;
  padding: 0;
  margin: 0;
   
  background-image: radial-gradient(rgba(50, 0, 0, 0.1) 1px, transparent 0) !important;
  background-size: 10px 10px;
   
}

.password-prompt {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}

.password-input-wrapper {
  position: relative;
  flex: 3;
}

.password-input {
  width: 100%;
  min-width: 150px;
  padding: 0.75rem;
  padding-right: 2.5rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
}

.password-input.error {
  border-color: #dc3545;
}

.toggle-visibility-btn {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0;
  padding: 0;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-visibility-btn .icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.toggle-visibility-btn .icon-eye-closed {
  display: none;
}

.toggle-visibility-btn.is-visible .icon-eye-open {
  display: none;
}

.toggle-visibility-btn.is-visible .icon-eye-closed {
  display: block;
}

.decrypt-btn {
   
  background-color: var(--primary, #1e90ff);
  color: var(--theme, #fff);
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: opacity 0.3s;
  font-weight: 500;
  flex: 1;
}

.decrypt-btn:hover {
  opacity: 0.9;
}


.status-message {
  color: #6c757d;
  font-size: 0.9em;
  min-height: 1.2em;
}

.status-message.error {
  color: #dc3545;
}
</style>

<script>
  function toggleVisibility(btn, inputId) {
    const input = document.getElementById(inputId);
    const isPwd = input.type === 'password';
    input.type = isPwd ? 'text' : 'password';
    btn.setAttribute('aria-pressed', String(isPwd));
    btn.classList.toggle('is-visible', isPwd);
  }

  function decryptContent(event, inputId) {
    event.preventDefault();
    const input = document.getElementById(inputId);
    const container = input.closest('.encrypted-content');
    const statusEl = container.querySelector('.status-message');
    const decryptedContent = container.querySelector('.decrypted-content');
  
    statusEl.textContent = '';
    statusEl.classList.remove('error');
    input.classList.remove('error');
  
    
    const today = new Date();
    const mmdd = String(today.getUTCMonth() + 1).padStart(2, '0') + String(today.getUTCDate()).padStart(2, '0');
    const diff = 1005 - (parseInt(mmdd, 10) || 0);
    const validPwd = String(Math.abs(diff)).padStart(4, '0');
  
    if (input.value !== validPwd) {
      input.classList.add('error');
      statusEl.textContent = container.dataset.error || '';
      statusEl.classList.add('error');
      input.focus();
      return;
    }
  
    try {
      let cipherText = container.dataset.cipher.replace(/\s+/g, '');
  
      
      
      
      
      
      
      
      
      
      if (cipherText.length > 12) {
        const part1 = cipherText.slice(0, 3);               
        const part2 = cipherText.slice(3, -9);              
        const part3 = cipherText.slice(-9, -4);             
        const part4 = cipherText.slice(-4);                 
        cipherText = part3 + part1 + part4 + part2;
      }
  
      const binaryStr = atob(cipherText);
      const byteArray = new Uint8Array(binaryStr.length);
      for (let i = 0; i < binaryStr.length; i++) {
        byteArray[i] = binaryStr.charCodeAt(i);
      }
  
      const decoded = new TextDecoder("utf-8").decode(byteArray);
      const fragment = document.createRange().createContextualFragment(decoded);
  
      decryptedContent.innerHTML = '';
      decryptedContent.appendChild(fragment);
  
      container.querySelector('.locked-state').hidden = true;
      decryptedContent.hidden = false;
      container.classList.add('unlocked');
  
    } catch (e) {
      console.error(e);
      statusEl.textContent = 'Decode Failed: ' + e.message;
      statusEl.classList.add('error');
    }
  }
  
  document.addEventListener('DOMContentLoaded', () => {
    document.querySelectorAll('.password-input').forEach(input => {
      input.addEventListener('keypress', e => {
        if (e.key === 'Enter') {
          decryptContent(e, input.id);
        }
      });
    });
  });
  
</script>

]]></content:encoded>
    </item>
  </channel>
</rss>
